aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-14 16:40:43 +0000
committerChris Lattner <sabre@nondot.org>2002-05-14 16:40:43 +0000
commitcdece545dd24fbfc67a4651477eedf6ebde03303 (patch)
tree9e11f2c859f25b34c207ecc315ac0e3b324e9d1b
parent4ad532299a9109c1b30f45a5207b5ac0e31179fb (diff)
New testcase for bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2626 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/InstCombine/2002-05-14-SubFailure.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2002-05-14-SubFailure.ll b/test/Transforms/InstCombine/2002-05-14-SubFailure.ll
new file mode 100644
index 0000000000..070899bb9f
--- /dev/null
+++ b/test/Transforms/InstCombine/2002-05-14-SubFailure.ll
@@ -0,0 +1,14 @@
+; Instcombine was missing a test that caused it to make illegal transformations
+; sometimes. In this case, it transforms the sub into an add:
+; RUN: if as < %s | opt -instcombine | dis | grep add
+; RUN: then exit 1
+; RUN: else exit 0
+; RUN: fi
+;
+
+
+int "test"(int %i, int %j) {
+ %A = mul int %i, %j
+ %B = sub int 2, %A
+ ret int %B
+}