1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=newgvn -S | FileCheck %s
4 @G = external constant [4 x i32]
6 define i32 @test(ptr %p, i32 %i) nounwind {
9 ; CHECK-NEXT: [[P:%.*]] = getelementptr [4 x i32], ptr @G, i32 0, i32 [[I:%.*]]
10 ; CHECK-NEXT: store i8 4, ptr [[P1:%.*]], align 1
11 ; CHECK-NEXT: ret i32 0
14 %p.i = getelementptr [4 x i32], ptr @G, i32 0, i32 %i
15 %A = load i32, ptr %p.i
17 %B = load i32, ptr %p.i