brintos

brintos / llvm-project-archived public Read only

0
0
Text · 601 B · 2836a7c Raw
18 lines · plain
1; RUN: opt < %s -aa-pipeline=basic-aa,globals-aa -passes="require<globals-aa>,function(gvn)" -S -enable-unsafe-globalsmodref-alias-results | FileCheck %s2;3; Note that this test relies on an unsafe feature of GlobalsModRef. While this4; test is correct and safe, GMR's technique for handling this isn't generally.5 6@X = internal global i32 4		; <ptr> [#uses=1]7 8define i32 @test(ptr %P) {9; CHECK:      @test10; CHECK-NEXT: store i32 7, ptr %P11; CHECK-NEXT: store i32 12, ptr @X12; CHECK-NEXT: ret i32 713	store i32 7, ptr %P14	store i32 12, ptr @X15	%V = load i32, ptr %P		; <i32> [#uses=1]16	ret i32 %V17}18