[llvm] r375158 - [x86] add test for setcc to shift transform; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 12:32:24 PDT 2019
Author: spatel
Date: Thu Oct 17 12:32:24 2019
New Revision: 375158
URL: http://llvm.org/viewvc/llvm-project?rev=375158&view=rev
Log:
[x86] add test for setcc to shift transform; NFC
Modified:
llvm/trunk/test/CodeGen/X86/setcc.ll
Modified: llvm/trunk/test/CodeGen/X86/setcc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/setcc.ll?rev=375158&r1=375157&r2=375158&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/setcc.ll (original)
+++ llvm/trunk/test/CodeGen/X86/setcc.ll Thu Oct 17 12:32:24 2019
@@ -89,4 +89,18 @@ define zeroext i1 @t6(i32 %a) #0 {
ret i1 %.not
}
+define i16 @shift_and(i16 %a) {
+; CHECK-LABEL: shift_and:
+; CHECK: ## %bb.0:
+; CHECK-NEXT: movl %edi, %eax
+; CHECK-NEXT: shrl $10, %eax
+; CHECK-NEXT: andl $1, %eax
+; CHECK-NEXT: ## kill: def $ax killed $ax killed $eax
+; CHECK-NEXT: retq
+ %and = and i16 %a, 1024
+ %cmp = icmp ne i16 %and, 0
+ %conv = zext i1 %cmp to i16
+ ret i16 %conv
+}
+
attributes #0 = { "target-cpu"="skylake-avx512" }
More information about the llvm-commits
mailing list