brintos

brintos / llvm-project-archived public Read only

0
0
Text · 536 B · e6545e0 Raw
29 lines · plain
1; RUN: opt -S < %s -passes=globalopt | FileCheck %s2 3@G = internal global i32 424 5define i8 @f() norecurse {6; CHECK-LABEL: @f7; CHECK: alloca8; CHECK-NOT: @G9; CHECK: }10  store i32 42, ptr @G11  %a = load i8, ptr @G12  ret i8 %a13}14 15@H = internal global i32 4216@Halias = alias i32, ptr @H17 18; @H can't be localized because @Halias uses it, and @Halias can't be converted to an instruction.19define i8 @g() norecurse {20; CHECK-LABEL: @g21; CHECK-NOT: alloca22; CHECK: @H23; CHECK: }24  store i32 42, ptr @H25  %a = load i8, ptr @H26  ret i8 %a27}28 29