[llvm] r314710 - [InstCombine] add icmp (shr X, Y), 0 test; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 13:07:15 PDT 2017
Author: spatel
Date: Mon Oct 2 13:07:15 2017
New Revision: 314710
URL: http://llvm.org/viewvc/llvm-project?rev=314710&view=rev
Log:
[InstCombine] add icmp (shr X, Y), 0 test; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/icmp-shr.ll
Modified: llvm/trunk/test/Transforms/InstCombine/icmp-shr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp-shr.ll?rev=314710&r1=314709&r2=314710&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/icmp-shr.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/icmp-shr.ll Mon Oct 2 13:07:15 2017
@@ -493,3 +493,17 @@ define i1 @exact_multiuse(i32 %x) {
ret i1 %cmp
}
+declare void @foo2(<2 x i32>)
+define <2 x i1> @exact_eq0_multiuse(<2 x i32> %x, <2 x i32> %y) {
+; CHECK-LABEL: @exact_eq0_multiuse(
+; CHECK-NEXT: [[SH:%.*]] = ashr exact <2 x i32> %x, %y
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x i32> [[SH]], zeroinitializer
+; CHECK-NEXT: call void @foo2(<2 x i32> [[SH]])
+; CHECK-NEXT: ret <2 x i1> [[CMP]]
+;
+ %sh = ashr exact <2 x i32> %x, %y
+ %cmp = icmp eq <2 x i32> %sh, zeroinitializer
+ call void @foo2(<2 x i32> %sh)
+ ret <2 x i1> %cmp
+}
+
More information about the llvm-commits
mailing list