aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-02-06 01:16:25 +0000
committerBob Wilson <bob.wilson@apple.com>2010-02-06 01:16:25 +0000
commit4844f9636a384a2b27f93513b94a50223ac31894 (patch)
tree429f5a6c8565c1fdfac7a64b3608f334680feecd
parentc5dc725a7b5176771a55ea1b5ceb5666ae084e88 (diff)
downloadexternal_llvm-4844f9636a384a2b27f93513b94a50223ac31894.zip
external_llvm-4844f9636a384a2b27f93513b94a50223ac31894.tar.gz
external_llvm-4844f9636a384a2b27f93513b94a50223ac31894.tar.bz2
Add a test for my change to disable reassociation for i1 types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95465 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/Reassociate/basictest.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/Reassociate/basictest.ll b/test/Transforms/Reassociate/basictest.ll
index e77d83d..0864740 100644
--- a/test/Transforms/Reassociate/basictest.ll
+++ b/test/Transforms/Reassociate/basictest.ll
@@ -203,4 +203,14 @@ define i32 @test14(i32 %X1, i32 %X2) {
; CHECK-NEXT: ret i32
}
+; Do not reassociate expressions of type i1
+define i32 @test15(i32 %X1, i32 %X2, i32 %X3) {
+ %A = icmp ne i32 %X1, 0
+ %B = icmp slt i32 %X2, %X3
+ %C = and i1 %A, %B
+ %D = select i1 %C, i32 %X1, i32 0
+ ret i32 %D
+; CHECK: @test15
+; CHECK: and i1 %A, %B
+}