blob: 367356e6311a264fd7a058277011253690b71877 [file] [log] [blame]
Chris Lattner3c01f7b2009-06-16 17:23:25 +00001; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i32 1}
2
3declare void @test2()
4
5define i32 @test(i1 %cond, i32 *%P) {
6 %A = alloca i32
7 store i32 1, i32* %P
8 store i32 1, i32* %A
9
10 call void @test2() readonly
11
12 %P2 = select i1 %cond, i32 *%P, i32* %A
13 %V = load i32* %P2
14 ret i32 %V
15}