1 ; This test makes sure that these instructions are properly eliminated.
4 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep load
8 %Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 },
9 { int, float } { int 37, float 1.2312 } ]
10 %Z = constant [2 x { int, float }] zeroinitializer
18 %A = getelementptr [2 x { int, float}]* %Y, long 0, long 1, ubyte 1
25 %A = getelementptr [2 x { int, float}]* %Y, long 0, long 0, ubyte 0
31 %A = getelementptr [2 x { int, float}]* %Z, long 0, long 1, ubyte 0
36 ; load (select (Cond, &V1, &V2)) --> select(Cond, load &V1, load &V2)
38 %Y = select bool %C, int* %X, int* %X2
43 ; load (phi (&V1, &V2, &V3)) --> phi(load &V1, load &V2, load &V3)
46 br bool %C, label %cond_true.i, label %cond_continue.i
49 br label %cond_continue.i
52 %mem_tmp.i.0 = phi int* [ %X, %cond_true.i ], [ %X2, %entry ]
53 %tmp.3 = load int* %mem_tmp.i.0
58 %V = getelementptr int* null, int %X
65 %X = load int* %P ;; Trivial store->load forwarding