19 lines · plain
1; RUN: opt < %s -aa-pipeline=basic-aa,globals-aa -passes='require<globals-aa>,gvn' -S | FileCheck %s2 3@X = internal global i32 4 ; <ptr> [#uses=2]4 5define i32 @test(ptr %P) {6; CHECK: @test7; CHECK-NEXT: store i32 12, ptr @X8; CHECK-NEXT: call void @doesnotmodX()9; CHECK-NEXT: ret i32 1210 store i32 12, ptr @X11 call void @doesnotmodX( )12 %V = load i32, ptr @X ; <i32> [#uses=1]13 ret i32 %V14}15 16define void @doesnotmodX() {17 ret void18}19