[llvm] r302434 - [InstCombine] add another test for PR32949; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 08:58:57 PDT 2017
Author: spatel
Date: Mon May 8 10:58:57 2017
New Revision: 302434
URL: http://llvm.org/viewvc/llvm-project?rev=302434&view=rev
Log:
[InstCombine] add another test for PR32949; NFC
A patch for the InstSimplify variant of this bug is up for review here:
https://reviews.llvm.org/D32954
Modified:
llvm/trunk/test/Transforms/InstCombine/icmp.ll
Modified: llvm/trunk/test/Transforms/InstCombine/icmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp.ll?rev=302434&r1=302433&r2=302434&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/icmp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/icmp.ll Mon May 8 10:58:57 2017
@@ -695,6 +695,19 @@ define i1 @test48(i32 %X, i32 %Y, i32 %Z
ret i1 %C
}
+; FIXME: The above transform only works for equality predicates.
+
+define i1 @PR32949(i32 %X, i32 %Y, i32 %Z) {
+; CHECK-LABEL: @PR32949(
+; CHECK-NEXT: [[C:%.*]] = icmp sgt i32 %X, %Y
+; CHECK-NEXT: ret i1 [[C]]
+;
+ %A = sdiv exact i32 %X, %Z
+ %B = sdiv exact i32 %Y, %Z
+ %C = icmp sgt i32 %A, %B
+ ret i1 %C
+}
+
; PR8469
define <2 x i1> @test49(<2 x i32> %tmp3) {
; CHECK-LABEL: @test49(
More information about the llvm-commits
mailing list