llvm.org GIT mirror llvm / 8d53585
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 Bob Wilson 9 years ago
1 changed file(s) with 11 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
202202 ; CHECK-NEXT: ret i32
203203 }
204204
205
205 ; Do not reassociate expressions of type i1
206 define i32 @test15(i32 %X1, i32 %X2, i32 %X3) {
207 %A = icmp ne i32 %X1, 0
208 %B = icmp slt i32 %X2, %X3
209 %C = and i1 %A, %B
210 %D = select i1 %C, i32 %X1, i32 0
211 ret i32 %D
212 ; CHECK: @test15
213 ; CHECK: and i1 %A, %B
214 }
215