summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/popcnt-schedule.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/popcnt-schedule.ll')
-rw-r--r--llvm/test/CodeGen/X86/popcnt-schedule.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/popcnt-schedule.ll b/llvm/test/CodeGen/X86/popcnt-schedule.ll
index 4f590bd96bb..d84d489a068 100644
--- a/llvm/test/CodeGen/X86/popcnt-schedule.ll
+++ b/llvm/test/CodeGen/X86/popcnt-schedule.ll
@@ -8,6 +8,7 @@
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=broadwell | FileCheck %s --check-prefix=CHECK --check-prefix=BROADWELL
; 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=x86-64 -mattr=+popcnt | FileCheck %s --check-prefix=CHECK --check-prefix=BDVER2
; 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
@@ -60,6 +61,14 @@ define i16 @test_ctpop_i16(i16 zeroext %a0, i16 *%a1) {
; SKYLAKE-NEXT: # kill: def $ax killed $ax killed $eax
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
+; BDVER2-LABEL: test_ctpop_i16:
+; BDVER2: # %bb.0:
+; BDVER2-NEXT: popcntw (%rsi), %cx # sched: [9:1.00]
+; BDVER2-NEXT: popcntw %di, %ax # sched: [3:1.00]
+; BDVER2-NEXT: orl %ecx, %eax # sched: [1:0.33]
+; BDVER2-NEXT: # kill: def $ax killed $ax killed $eax
+; BDVER2-NEXT: retq # sched: [1:1.00]
+;
; BTVER2-LABEL: test_ctpop_i16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: popcntw (%rsi), %cx # sched: [4:1.00]
@@ -126,6 +135,13 @@ define i32 @test_ctpop_i32(i32 %a0, i32 *%a1) {
; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
+; BDVER2-LABEL: test_ctpop_i32:
+; BDVER2: # %bb.0:
+; BDVER2-NEXT: popcntl (%rsi), %ecx # sched: [9:1.00]
+; BDVER2-NEXT: popcntl %edi, %eax # sched: [3:1.00]
+; BDVER2-NEXT: orl %ecx, %eax # sched: [1:0.33]
+; BDVER2-NEXT: retq # sched: [1:1.00]
+;
; BTVER2-LABEL: test_ctpop_i32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: popcntl (%rsi), %ecx # sched: [4:1.00]
@@ -190,6 +206,13 @@ define i64 @test_ctpop_i64(i64 %a0, i64 *%a1) {
; SKYLAKE-NEXT: orq %rcx, %rax # sched: [1:0.25]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
+; BDVER2-LABEL: test_ctpop_i64:
+; BDVER2: # %bb.0:
+; BDVER2-NEXT: popcntq (%rsi), %rcx # sched: [9:1.00]
+; BDVER2-NEXT: popcntq %rdi, %rax # sched: [3:1.00]
+; BDVER2-NEXT: orq %rcx, %rax # sched: [1:0.33]
+; BDVER2-NEXT: retq # sched: [1:1.00]
+;
; BTVER2-LABEL: test_ctpop_i64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: popcntq (%rsi), %rcx # sched: [4:1.00]
OpenPOWER on IntegriCloud