Move a DenseMap's declaration outside of a loop, and just call
[oota-llvm.git] / test / Transforms / InstCombine / getelementptr-seteq.ll
1 ; Test folding of constantexpr geps into normal geps.
2 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {icmp eq i64 %X, -1}
3 ; PR2235
4
5 %S = type { i32, [ 100 x i32] }
6
7 define i1 @test(i64 %X, %S* %P) {
8         %A = getelementptr %S* %P, i32 0, i32 1, i64 %X
9         %B = getelementptr %S* %P, i32 0, i32 0
10         %C = icmp eq i32* %A, %B
11         ret i1 %C
12 }
13