summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-05 22:25:47 +0000
committerChris Lattner <sabre@nondot.org>2002-12-05 22:25:47 +0000
commitb20bdd2ba157feb2ce0642f9ae25b495a253274c (patch)
tree18fcbcdf08b6205b29e37dbd53cc4ed362394969 /llvm
parentbfff743897a529cb203eff0dc1722a6c3befc0b8 (diff)
downloadbcm5719-llvm-b20bdd2ba157feb2ce0642f9ae25b495a253274c.tar.gz
bcm5719-llvm-b20bdd2ba157feb2ce0642f9ae25b495a253274c.zip
New testcase pointed out by Casey Carter
llvm-svn: 4934
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll b/llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll
new file mode 100644
index 00000000000..c8e2aca71b0
--- /dev/null
+++ b/llvm/test/Regression/Transforms/InstCombine/2002-12-05-MissedConstProp.ll
@@ -0,0 +1,13 @@
+; RUN: if as < %s | opt -instcombine | dis | grep add
+; RUN: then exit 1
+; RUN: else exit 0
+; RUN: fi
+
+int %test(int %A) {
+ %A.neg = sub int 0, %A
+ %.neg = sub int 0, 1
+ %X = add int %.neg, 1
+ %Y.neg.ra = add int %A, %X
+ %r = add int %A.neg, %Y.neg.ra
+ ret int %r
+}
OpenPOWER on IntegriCloud