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:
809c94d
)
[InstCombine] add test for wrong icmp constant (PR27792)
author
Sanjay Patel
<spatel@rotateright.com>
Tue, 17 May 2016 19:25:55 +0000
(19:25 +0000)
committer
Sanjay Patel
<spatel@rotateright.com>
Tue, 17 May 2016 19:25:55 +0000
(19:25 +0000)
The code fix for this was checked in at r269797.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269803
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
24a539b
..
099d159
100644
(file)
--- a/
test/Transforms/InstCombine/icmp.ll
+++ b/
test/Transforms/InstCombine/icmp.ll
@@
-2097,3
+2097,15
@@
if.then3: ; preds = %if.end
return: ; preds = %if.end, %entry, %if.then3
ret void
}
+
+; When canonicalizing to 'sgt', make sure the constant is correct.
+
+define i1 @PR27792(i128 %a) {
+; CHECK-LABEL: @PR27792(
+; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i128 %a, -1
+; CHECK-NEXT: ret i1 [[CMP]]
+;
+ %cmp = icmp sge i128 %a, 0
+ ret i1 %cmp
+}
+