1 ; This test makes sure that these instructions are properly constant propagated.
3 ; RUN: opt < %s -ipsccp -S | not grep load
4 ; RUN: opt < %s -ipsccp -S | not grep add
5 ; RUN: opt < %s -ipsccp -S | not grep phi
8 @Y = constant [2 x { i212, float }] [ { i212, float } { i212 12, float 1.0 },
9 { i212, float } { i212 37, float 2.0 } ]
11 define internal float @test2() {
12 %A = getelementptr [2 x { i212, float}]* @Y, i32 0, i32 1, i32 1
17 define internal float @test3() {
18 %A = getelementptr [2 x { i212, float}]* @Y, i32 0, i32 0, i32 1
23 define internal float @test()
25 %A = call float @test2()
26 %B = call float @test3()
28 %E = fdiv float %B, %A
34 %A = call float @test()
35 %B = fcmp oge float %A, 1.0
36 br i1 %B, label %T, label %F
38 %C = fadd float %A, 1.0
41 %D = fadd float %A, 2.0
44 %E = phi float [%C, %T], [%D, %F]