summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-11-16 19:41:26 +0000
committerDuncan Sands <baldrick@free.fr>2012-11-16 19:41:26 +0000
commitc41076c07c5c44e1bea8c1eef7e4eef4973a467a (patch)
tree53c779ea1630de57002cd11c87a05976f5d0498c /llvm/test
parentcceda898b87e58465672c5a6ee427608c3f353f1 (diff)
downloadbcm5719-llvm-c41076c07c5c44e1bea8c1eef7e4eef4973a467a.tar.gz
bcm5719-llvm-c41076c07c5c44e1bea8c1eef7e4eef4973a467a.zip
InstructionSimplify should be able to simplify A+B==B+A to 'true'
but wasn't due to the same logic bug that caused PR14361. llvm-svn: 168186
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstSimplify/compare.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll
index ced74bd4be9..ce2bb799c81 100644
--- a/llvm/test/Transforms/InstSimplify/compare.ll
+++ b/llvm/test/Transforms/InstSimplify/compare.ll
@@ -266,6 +266,15 @@ define i1 @add5(i32 %x, i32 %y) {
; CHECK: ret i1 true
}
+define i1 @add6(i64 %A, i64 %B) {
+; CHECK: @add6
+ %s1 = add i64 %A, %B
+ %s2 = add i64 %B, %A
+ %cmp = icmp eq i64 %s1, %s2
+ ret i1 %cmp
+; CHECK: ret i1 true
+}
+
define i1 @addpowtwo(i32 %x, i32 %y) {
; CHECK: @addpowtwo
%l = lshr i32 %x, 1
OpenPOWER on IntegriCloud