summaryrefslogtreecommitdiffstats
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
commita10e65c852e1a4e27d57960276c6b0ef691fda71 (patch)
tree3798eb7459e997fd22d9295ca878b8d9819777e0
parentcae03b1e6dde7767f374a4e4a0e652900bad6fbd (diff)
downloadbcm5719-llvm-a10e65c852e1a4e27d57960276c6b0ef691fda71.tar.gz
bcm5719-llvm-a10e65c852e1a4e27d57960276c6b0ef691fda71.zip
Add a test for my change to disable reassociation for i1 types.
llvm-svn: 95465
-rw-r--r--llvm/test/Transforms/Reassociate/basictest.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Reassociate/basictest.ll b/llvm/test/Transforms/Reassociate/basictest.ll
index e77d83d160e..086474066c5 100644
--- a/llvm/test/Transforms/Reassociate/basictest.ll
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud