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