summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-08 17:38:55 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-08 17:38:55 +0000
commitf6825c5ddc7e6f6861301f70931807e22843af30 (patch)
treee46a847b42d493bc21fa1da7a58a6cc111dfc6e9 /test
parent75e1068c60828682833c0e24f77acc26525ac258 (diff)
downloadllvm-f6825c5ddc7e6f6861301f70931807e22843af30.tar.gz
llvm-f6825c5ddc7e6f6861301f70931807e22843af30.tar.bz2
llvm-f6825c5ddc7e6f6861301f70931807e22843af30.tar.xz
For PR950:
Add a test for a regression in combining of ICmp instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/2006-12-08-ICmp-Combining.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2006-12-08-ICmp-Combining.ll b/test/Transforms/InstCombine/2006-12-08-ICmp-Combining.ll
new file mode 100644
index 0000000000..7d4e3f3f77
--- /dev/null
+++ b/test/Transforms/InstCombine/2006-12-08-ICmp-Combining.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep '%bothcond ='
+bool %Doit_bb(int %i.0) {
+bb: ; preds = %newFuncRoot
+ %tmp = setgt int %i.0, 0 ; <bool> [#uses=1]
+ %tmp.not = xor bool %tmp, true ; <bool> [#uses=1]
+ %tmp2 = setgt int %i.0, 8 ; <bool> [#uses=1]
+ %bothcond = or bool %tmp.not, %tmp2 ; <bool> [#uses=1]
+ br bool %bothcond, label %exitTrue, label %exitFalse
+
+exitTrue: ; preds = %bb
+ ret bool true
+
+exitFalse: ; preds = %bb
+ ret bool false
+
+}