brintos

brintos / llvm-project-archived public Read only

0
0
Text · 560 B · 37dee1f Raw
17 lines · plain
1; RUN: opt < %s -aa-pipeline=basic-aa -passes=gvn,dce -S | FileCheck %s2 3        %struct.A = type { i32 }4        %struct.B = type { %struct.A }5@a = global %struct.B zeroinitializer           ; <ptr> [#uses=2]6 7define i32 @_Z3fooP1A(ptr %b) {8; CHECK: %tmp7 = load9; CHECK: ret i32 %tmp710entry:11        store i32 1, ptr @a, align 812        %tmp4 = getelementptr %struct.A, ptr %b, i32 0, i32 0               ;<ptr> [#uses=1]13        store i32 0, ptr %tmp4, align 414        %tmp7 = load i32, ptr @a, align 8           ; <i32> [#uses=1]15        ret i32 %tmp716}17