; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep load
+; RUN: opt < %s -instcombine -S | not grep load
@X = constant i32 42 ; <i32*> [#uses=2]
@X2 = constant i32 47 ; <i32*> [#uses=1]
%V = load i32* %P ; <i32> [#uses=1]
ret i32 %V
}
+
+define double @test11(double* %p) {
+ %t0 = getelementptr double* %p, i32 1
+ store double 2.0, double* %t0
+ %t1 = getelementptr double* %p, i32 1
+ %x = load double* %t1
+ ret double %x
+}