1 ; RUN: opt -passes=globalopt -S < %s | FileCheck %s
4 @g = internal global ptr null, align 8
6 ; Test code pattern for:
7 ; class s { int a; s() { a = 1;} };
11 define internal void @f() {
13 ; CHECK-NEXT: ret void
15 %1 = tail call ptr @_Znwm(i64 4)
16 store i32 1, ptr %1, align 4
17 store ptr %1, ptr @g, align 8
21 define dso_local signext i32 @main() {
24 ; CHECK-NEXT: call fastcc void @f()
25 ; CHECK-NEXT: ret i32 1
29 %0 = load ptr, ptr @g, align 4
30 %1 = load i32, ptr %0, align 4
34 declare nonnull ptr @_Znwm(i64)
36 declare signext i32 @printf(ptr, ...)