OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5920631
)
[InstCombine] add another test for PR32949; NFC
author
Sanjay Patel
<spatel@rotateright.com>
Mon, 8 May 2017 15:58:57 +0000
(15:58 +0000)
committer
Sanjay Patel
<spatel@rotateright.com>
Mon, 8 May 2017 15:58:57 +0000
(15:58 +0000)
A patch for the InstSimplify variant of this bug is up for review here:
https://reviews.llvm.org/D32954
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302434
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/Transforms/InstCombine/icmp.ll
patch
|
blob
|
history
diff --git
a/test/Transforms/InstCombine/icmp.ll
b/test/Transforms/InstCombine/icmp.ll
index
edfa9a1
..
b29931c
100644
(file)
--- a/
test/Transforms/InstCombine/icmp.ll
+++ b/
test/Transforms/InstCombine/icmp.ll
@@
-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(