22 lines · plain
1; RUN: opt < %s -aa-pipeline=basic-aa,globals-aa -passes=gvn -S | FileCheck %s2 3; See PR267744 5@X = internal global i32 46 7define i32 @test(ptr %P) {8; CHECK: @test9; CHECK-NEXT: store i32 12, ptr @X10; CHECK-NEXT: call void @doesnotmodX()11; CHECK-NEXT: %V = load i32, ptr @X12; CHECK-NEXT: ret i32 %V13 store i32 12, ptr @X14 call void @doesnotmodX( )15 %V = load i32, ptr @X16 ret i32 %V17}18 19define linkonce_odr void @doesnotmodX() {20 ret void21}22