Check for extractelement with a variable operand for the element number.
[oota-llvm.git] / test / Transforms / GVN / mixed.ll
1 ; RUN: opt < %s -basicaa -gvn -S | not grep DEADLOAD
2 ; RUN: opt < %s -basicaa -gvn -S | not grep DEADGEP
3
4 define i32 @main(i32** %p) {
5 block1:
6         %z1 = load i32** %p
7         %z2 = getelementptr i32* %z1, i32 0
8         %z3 = load i32* %z2
9         %DEADLOAD = load i32** %p
10         %DEADGEP = getelementptr i32* %DEADLOAD, i32 0
11         %DEADLOAD2 = load i32* %DEADGEP
12         ret i32 %DEADLOAD2
13 }