[llvm] r324403 - [x86] add test to show missed BMI isel; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 13:18:53 PST 2018
Author: spatel
Date: Tue Feb 6 13:18:53 2018
New Revision: 324403
URL: http://llvm.org/viewvc/llvm-project?rev=324403&view=rev
Log:
[x86] add test to show missed BMI isel; NFC
Modified:
llvm/trunk/test/CodeGen/X86/bmi.ll
Modified: llvm/trunk/test/CodeGen/X86/bmi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/bmi.ll?rev=324403&r1=324402&r2=324403&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/bmi.ll (original)
+++ llvm/trunk/test/CodeGen/X86/bmi.ll Tue Feb 6 13:18:53 2018
@@ -808,3 +808,18 @@ define i64 @blsr64(i64 %x) {
ret i64 %tmp2
}
+; PR35792 - https://bugs.llvm.org/show_bug.cgi?id=35792
+
+define i64 @blsr_disguised_constant(i64 %x) {
+; CHECK-LABEL: blsr_disguised_constant:
+; CHECK: # %bb.0:
+; CHECK-NEXT: leal 65535(%rdi), %eax
+; CHECK-NEXT: andl %edi, %eax
+; CHECK-NEXT: movzwl %ax, %eax
+; CHECK-NEXT: retq
+ %a1 = and i64 %x, 65535
+ %a2 = add i64 %x, 65535
+ %r = and i64 %a1, %a2
+ ret i64 %r
+}
+
More information about the llvm-commits
mailing list