Index: llvm/trunk/test/CodeGen/X86/bmi-schedule.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/bmi-schedule.ll +++ llvm/trunk/test/CodeGen/X86/bmi-schedule.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=x86-64 -mattr=+bmi | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=knl | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1 @@ -25,6 +25,15 @@ ; HASWELL-NEXT: # kill: %AX %AX %EAX ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_andn_i16: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: andnl %esi, %edi, %eax # sched: [1:0.50] +; SKYLAKE-NEXT: notl %edi # sched: [1:0.25] +; SKYLAKE-NEXT: andw (%rdx), %di # sched: [1:0.50] +; SKYLAKE-NEXT: addl %edi, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: # kill: %AX %AX %EAX +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_andn_i16: ; BTVER2: # BB#0: ; BTVER2-NEXT: andnl %esi, %edi, %eax # sched: [1:0.50] @@ -65,6 +74,13 @@ ; HASWELL-NEXT: addl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_andn_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: andnl %esi, %edi, %ecx # sched: [1:0.50] +; SKYLAKE-NEXT: andnl (%rdx), %edi, %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_andn_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: andnl (%rdx), %edi, %eax # sched: [4:1.00] @@ -101,6 +117,13 @@ ; HASWELL-NEXT: addq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_andn_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: andnq %rsi, %rdi, %rcx # sched: [1:0.50] +; SKYLAKE-NEXT: andnq (%rdx), %rdi, %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_andn_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: andnq (%rdx), %rdi, %rax # sched: [4:1.00] @@ -137,6 +160,13 @@ ; HASWELL-NEXT: addl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_bextr_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: bextrl %edi, (%rdx), %ecx # sched: [2:0.50] +; SKYLAKE-NEXT: bextrl %edi, %esi, %eax # sched: [2:0.50] +; SKYLAKE-NEXT: addl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_bextr_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: bextrl %edi, (%rdx), %ecx @@ -173,6 +203,13 @@ ; HASWELL-NEXT: addq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_bextr_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: bextrq %rdi, (%rdx), %rcx # sched: [2:0.50] +; SKYLAKE-NEXT: bextrq %rdi, %rsi, %rax # sched: [2:0.50] +; SKYLAKE-NEXT: addq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_bextr_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: bextrq %rdi, (%rdx), %rcx @@ -209,6 +246,13 @@ ; HASWELL-NEXT: addl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_blsi_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: blsil (%rsi), %ecx # sched: [1:0.50] +; SKYLAKE-NEXT: blsil %edi, %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_blsi_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: blsil (%rsi), %ecx @@ -246,6 +290,13 @@ ; HASWELL-NEXT: addq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_blsi_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: blsiq (%rsi), %rcx # sched: [1:0.50] +; SKYLAKE-NEXT: blsiq %rdi, %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_blsi_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: blsiq (%rsi), %rcx @@ -283,6 +334,13 @@ ; HASWELL-NEXT: addl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_blsmsk_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: blsmskl (%rsi), %ecx # sched: [1:0.50] +; SKYLAKE-NEXT: blsmskl %edi, %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_blsmsk_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: blsmskl (%rsi), %ecx @@ -320,6 +378,13 @@ ; HASWELL-NEXT: addq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_blsmsk_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: blsmskq (%rsi), %rcx # sched: [1:0.50] +; SKYLAKE-NEXT: blsmskq %rdi, %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_blsmsk_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: blsmskq (%rsi), %rcx @@ -357,6 +422,13 @@ ; HASWELL-NEXT: addl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_blsr_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: blsrl (%rsi), %ecx # sched: [1:0.50] +; SKYLAKE-NEXT: blsrl %edi, %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_blsr_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: blsrl (%rsi), %ecx @@ -394,6 +466,13 @@ ; HASWELL-NEXT: addq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_blsr_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: blsrq (%rsi), %rcx # sched: [1:0.50] +; SKYLAKE-NEXT: blsrq %rdi, %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_blsr_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: blsrq (%rsi), %rcx @@ -433,6 +512,14 @@ ; HASWELL-NEXT: # kill: %AX %AX %EAX ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_cttz_i16: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: tzcntw (%rsi), %cx # sched: [3:1.00] +; SKYLAKE-NEXT: tzcntw %di, %ax # sched: [3:1.00] +; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: # kill: %AX %AX %EAX +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_cttz_i16: ; BTVER2: # BB#0: ; BTVER2-NEXT: tzcntw (%rsi), %cx @@ -471,6 +558,13 @@ ; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_cttz_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: tzcntl (%rsi), %ecx # sched: [3:1.00] +; SKYLAKE-NEXT: tzcntl %edi, %eax # sched: [3:1.00] +; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_cttz_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: tzcntl (%rsi), %ecx @@ -507,6 +601,13 @@ ; HASWELL-NEXT: orq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_cttz_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: tzcntq (%rsi), %rcx # sched: [3:1.00] +; SKYLAKE-NEXT: tzcntq %rdi, %rax # sched: [3:1.00] +; SKYLAKE-NEXT: orq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_cttz_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: tzcntq (%rsi), %rcx Index: llvm/trunk/test/CodeGen/X86/lea32-schedule.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/lea32-schedule.ll +++ llvm/trunk/test/CodeGen/X86/lea32-schedule.ll @@ -5,7 +5,7 @@ ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=sandybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=ivybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=knl | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1 @@ -47,6 +47,12 @@ ; HASWELL-NEXT: leal -24(%rdi), %eax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal -24(%rdi), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %EDI %EDI %RDI @@ -99,6 +105,12 @@ ; HASWELL-NEXT: leal 1024(%rdi), %eax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal 1024(%rdi), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %EDI %EDI %RDI @@ -157,6 +169,13 @@ ; HASWELL-NEXT: leal (%rdi,%rsi), %eax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %ESI %ESI %RSI +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rsi), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %ESI %ESI %RSI @@ -219,6 +238,14 @@ ; HASWELL-NEXT: addl $16, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %ESI %ESI %RSI +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rsi), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl $16, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %ESI %ESI %RSI @@ -285,6 +312,15 @@ ; HASWELL-NEXT: # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %ESI %ESI %RSI +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rsi), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl $-4096, %eax # imm = 0xF000 +; SKYLAKE-NEXT: # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %ESI %ESI %RSI @@ -340,6 +376,12 @@ ; HASWELL-NEXT: leal (%rdi,%rdi,2), %eax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_mul: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rdi,2), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_mul: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %EDI %EDI %RDI @@ -395,6 +437,13 @@ ; HASWELL-NEXT: addl $-32, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_mul_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rdi,2), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl $-32, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_mul_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %EDI %EDI %RDI @@ -454,6 +503,14 @@ ; HASWELL-NEXT: # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_mul_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rdi,8), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl $10000, %eax # imm = 0x2710 +; SKYLAKE-NEXT: # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_mul_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %EDI %EDI %RDI @@ -512,6 +569,13 @@ ; HASWELL-NEXT: leal (%rdi,%rsi,2), %eax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_scale: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %ESI %ESI %RSI +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rsi,2), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_scale: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %ESI %ESI %RSI @@ -575,6 +639,14 @@ ; HASWELL-NEXT: addl $96, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_scale_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %ESI %ESI %RSI +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rsi,4), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl $96, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_scale_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %ESI %ESI %RSI @@ -642,6 +714,15 @@ ; HASWELL-NEXT: # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_scale_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: # kill: %ESI %ESI %RSI +; SKYLAKE-NEXT: # kill: %EDI %EDI %RDI +; SKYLAKE-NEXT: leal (%rdi,%rsi,8), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: addl $-1200, %eax # imm = 0xFB50 +; SKYLAKE-NEXT: # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_scale_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: # kill: %ESI %ESI %RSI Index: llvm/trunk/test/CodeGen/X86/lea64-schedule.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/lea64-schedule.ll +++ llvm/trunk/test/CodeGen/X86/lea64-schedule.ll @@ -5,7 +5,7 @@ ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=sandybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=ivybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=knl | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1 @@ -42,6 +42,11 @@ ; HASWELL-NEXT: leaq -24(%rdi), %rax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq -24(%rdi), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq -24(%rdi), %rax # sched: [1:0.50] @@ -87,6 +92,11 @@ ; HASWELL-NEXT: leaq 1024(%rdi), %rax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq 1024(%rdi), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq 1024(%rdi), %rax # sched: [1:0.50] @@ -133,6 +143,11 @@ ; HASWELL-NEXT: leaq (%rdi,%rsi), %rax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rsi), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq (%rdi,%rsi), %rax # sched: [1:0.50] @@ -181,6 +196,12 @@ ; HASWELL-NEXT: addq $16, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rsi), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq $16, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq 16(%rdi,%rsi), %rax # sched: [1:0.50] @@ -233,6 +254,13 @@ ; HASWELL-NEXT: # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rsi), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq $-4096, %rax # imm = 0xF000 +; SKYLAKE-NEXT: # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq -4096(%rdi,%rsi), %rax # sched: [1:0.50] @@ -279,6 +307,11 @@ ; HASWELL-NEXT: leaq (%rdi,%rdi,2), %rax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_mul: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rdi,2), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_mul: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq (%rdi,%rdi,2), %rax # sched: [1:0.50] @@ -327,6 +360,12 @@ ; HASWELL-NEXT: addq $-32, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_mul_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rdi,2), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq $-32, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_mul_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq -32(%rdi,%rdi,2), %rax # sched: [1:0.50] @@ -379,6 +418,13 @@ ; HASWELL-NEXT: # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_mul_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rdi,8), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq $10000, %rax # imm = 0x2710 +; SKYLAKE-NEXT: # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_mul_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq 10000(%rdi,%rdi,8), %rax # sched: [1:0.50] @@ -425,6 +471,11 @@ ; HASWELL-NEXT: leaq (%rdi,%rsi,2), %rax # sched: [1:0.50] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_scale: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rsi,2), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_scale: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq (%rdi,%rsi,2), %rax # sched: [1:0.50] @@ -474,6 +525,12 @@ ; HASWELL-NEXT: addq $96, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_scale_offset: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rsi,4), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq $96, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_scale_offset: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq 96(%rdi,%rsi,4), %rax # sched: [1:0.50] @@ -527,6 +584,13 @@ ; HASWELL-NEXT: # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_lea_add_scale_offset_big: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: leaq (%rdi,%rsi,8), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: addq $-1200, %rax # imm = 0xFB50 +; SKYLAKE-NEXT: # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_lea_add_scale_offset_big: ; BTVER2: # BB#0: ; BTVER2-NEXT: leaq -1200(%rdi,%rsi,8), %rax # sched: [1:0.50] Index: llvm/trunk/test/CodeGen/X86/lzcnt-schedule.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/lzcnt-schedule.ll +++ llvm/trunk/test/CodeGen/X86/lzcnt-schedule.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=x86-64 -mattr=+lzcnt | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=knl | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1 @@ -23,6 +23,14 @@ ; HASWELL-NEXT: # kill: %AX %AX %EAX ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_ctlz_i16: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: lzcntw (%rsi), %cx # sched: [3:1.00] +; SKYLAKE-NEXT: lzcntw %di, %ax # sched: [3:1.00] +; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: # kill: %AX %AX %EAX +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_ctlz_i16: ; BTVER2: # BB#0: ; BTVER2-NEXT: lzcntw (%rsi), %cx @@ -61,6 +69,13 @@ ; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_ctlz_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: lzcntl (%rsi), %ecx # sched: [3:1.00] +; SKYLAKE-NEXT: lzcntl %edi, %eax # sched: [3:1.00] +; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_ctlz_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: lzcntl (%rsi), %ecx @@ -97,6 +112,13 @@ ; HASWELL-NEXT: orq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_ctlz_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: lzcntq (%rsi), %rcx # sched: [3:1.00] +; SKYLAKE-NEXT: lzcntq %rdi, %rax # sched: [3:1.00] +; SKYLAKE-NEXT: orq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_ctlz_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: lzcntq (%rsi), %rcx Index: llvm/trunk/test/CodeGen/X86/movbe-schedule.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/movbe-schedule.ll +++ llvm/trunk/test/CodeGen/X86/movbe-schedule.ll @@ -3,7 +3,7 @@ ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=atom | FileCheck %s --check-prefix=CHECK --check-prefix=ATOM ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=slm | FileCheck %s --check-prefix=CHECK --check-prefix=SLM ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=knl | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1 @@ -37,6 +37,12 @@ ; HASWELL-NEXT: movbew %si, (%rdx) # sched: [1:1.00] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_movbe_i16: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: movbew (%rdi), %ax # sched: [1:0.50] +; SKYLAKE-NEXT: movbew %si, (%rdx) # sched: [1:1.00] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_movbe_i16: ; BTVER2: # BB#0: ; BTVER2-NEXT: movbew (%rdi), %ax # sched: [4:1.00] @@ -85,6 +91,12 @@ ; HASWELL-NEXT: movbel %esi, (%rdx) # sched: [1:1.00] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_movbe_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: movbel (%rdi), %eax # sched: [1:0.50] +; SKYLAKE-NEXT: movbel %esi, (%rdx) # sched: [1:1.00] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_movbe_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: movbel (%rdi), %eax # sched: [4:1.00] @@ -133,6 +145,12 @@ ; HASWELL-NEXT: movbeq %rsi, (%rdx) # sched: [1:1.00] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_movbe_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: movbeq (%rdi), %rax # sched: [1:0.50] +; SKYLAKE-NEXT: movbeq %rsi, (%rdx) # sched: [1:1.00] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_movbe_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: movbeq (%rdi), %rax # sched: [4:1.00] Index: llvm/trunk/test/CodeGen/X86/popcnt-schedule.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/popcnt-schedule.ll +++ llvm/trunk/test/CodeGen/X86/popcnt-schedule.ll @@ -5,7 +5,7 @@ ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=sandybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=ivybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=knl | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1 @@ -43,6 +43,14 @@ ; HASWELL-NEXT: # kill: %AX %AX %EAX ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_ctpop_i16: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: popcntw (%rsi), %cx # sched: [3:1.00] +; SKYLAKE-NEXT: popcntw %di, %ax # sched: [3:1.00] +; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: # kill: %AX %AX %EAX +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_ctpop_i16: ; BTVER2: # BB#0: ; BTVER2-NEXT: popcntw (%rsi), %cx # sched: [8:1.00] @@ -95,6 +103,13 @@ ; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_ctpop_i32: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: popcntl (%rsi), %ecx # sched: [3:1.00] +; SKYLAKE-NEXT: popcntl %edi, %eax # sched: [3:1.00] +; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_ctpop_i32: ; BTVER2: # BB#0: ; BTVER2-NEXT: popcntl (%rsi), %ecx # sched: [8:1.00] @@ -145,6 +160,13 @@ ; HASWELL-NEXT: orq %rcx, %rax # sched: [1:0.25] ; HASWELL-NEXT: retq # sched: [2:1.00] ; +; SKYLAKE-LABEL: test_ctpop_i64: +; SKYLAKE: # BB#0: +; SKYLAKE-NEXT: popcntq (%rsi), %rcx # sched: [3:1.00] +; SKYLAKE-NEXT: popcntq %rdi, %rax # sched: [3:1.00] +; SKYLAKE-NEXT: orq %rcx, %rax # sched: [1:0.25] +; SKYLAKE-NEXT: retq # sched: [2:1.00] +; ; BTVER2-LABEL: test_ctpop_i64: ; BTVER2: # BB#0: ; BTVER2-NEXT: popcntq (%rsi), %rcx # sched: [8:1.00]