aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:01:25 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:01:25 +0000
commitd8e91e46262bc44006913e6796843909f1ac7bcd (patch)
tree7d0c143d9b38190e0fa0180805389da22cd834c5 /test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll
parentb7eb8e35e481a74962664b63dfb09483b200209a (diff)
downloadsrc-d8e91e46262bc44006913e6796843909f1ac7bcd.tar.gz
src-d8e91e46262bc44006913e6796843909f1ac7bcd.zip
Vendor import of llvm trunk r351319 (just before the release_80 branchvendor/llvm/llvm-trunk-r351319
Notes
Notes: svn path=/vendor/llvm/dist/; revision=343171 svn path=/vendor/llvm/llvm-trunk-r351319/; revision=343172; tag=vendor/llvm/llvm-trunk-r351319
Diffstat (limited to 'test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll')
-rw-r--r--test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll22
1 files changed, 8 insertions, 14 deletions
diff --git a/test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll b/test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll
index f86df57b687e..872233f51ad4 100644
--- a/test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll
+++ b/test/CodeGen/X86/bmi-intrinsics-fast-isel-x86_64.ll
@@ -10,9 +10,9 @@
define i64 @test__andn_u64(i64 %a0, i64 %a1) {
; X64-LABEL: test__andn_u64:
; X64: # %bb.0:
-; X64-NEXT: xorq $-1, %rdi
-; X64-NEXT: andq %rsi, %rdi
; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: xorq $-1, %rax
+; X64-NEXT: andq %rsi, %rax
; X64-NEXT: retq
%xor = xor i64 %a0, -1
%res = and i64 %xor, %a1
@@ -67,14 +67,11 @@ define i64 @test__blsr_u64(i64 %a0) {
define i64 @test__tzcnt_u64(i64 %a0) {
; X64-LABEL: test__tzcnt_u64:
; X64: # %bb.0:
-; X64-NEXT: movl $64, %ecx
; X64-NEXT: tzcntq %rdi, %rax
-; X64-NEXT: cmovbq %rcx, %rax
; X64-NEXT: retq
%cmp = icmp ne i64 %a0, 0
- %cttz = call i64 @llvm.cttz.i64(i64 %a0, i1 true)
- %res = select i1 %cmp, i64 %cttz, i64 64
- ret i64 %res
+ %cttz = call i64 @llvm.cttz.i64(i64 %a0, i1 false)
+ ret i64 %cttz
}
;
@@ -84,9 +81,9 @@ define i64 @test__tzcnt_u64(i64 %a0) {
define i64 @test_andn_u64(i64 %a0, i64 %a1) {
; X64-LABEL: test_andn_u64:
; X64: # %bb.0:
-; X64-NEXT: xorq $-1, %rdi
-; X64-NEXT: andq %rsi, %rdi
; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: xorq $-1, %rax
+; X64-NEXT: andq %rsi, %rax
; X64-NEXT: retq
%xor = xor i64 %a0, -1
%res = and i64 %xor, %a1
@@ -151,14 +148,11 @@ define i64 @test_blsr_u64(i64 %a0) {
define i64 @test_tzcnt_u64(i64 %a0) {
; X64-LABEL: test_tzcnt_u64:
; X64: # %bb.0:
-; X64-NEXT: movl $64, %ecx
; X64-NEXT: tzcntq %rdi, %rax
-; X64-NEXT: cmovbq %rcx, %rax
; X64-NEXT: retq
%cmp = icmp ne i64 %a0, 0
- %cttz = call i64 @llvm.cttz.i64(i64 %a0, i1 true)
- %res = select i1 %cmp, i64 %cttz, i64 64
- ret i64 %res
+ %cttz = call i64 @llvm.cttz.i64(i64 %a0, i1 false)
+ ret i64 %cttz
}
declare i64 @llvm.cttz.i64(i64, i1)