1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=globalopt < %s | FileCheck %s
4 ; Make sure we don't recursively SRA if there are aggregate load/stores with
5 ; the same type as the global.
7 @g = internal global { i32, i32 } undef
11 ; CHECK-NEXT: store { i32, i32 } zeroinitializer, ptr @g, align 4
12 ; CHECK-NEXT: store { i32, i32 } { i32 0, i32 1 }, ptr @g, align 4
13 ; CHECK-NEXT: ret void
15 store { i32, i32 } zeroinitializer, ptr @g
16 store { i32, i32 } { i32 0, i32 1 }, ptr @g
20 define { i32, i32 } @load() {
22 ; CHECK-NEXT: [[V:%.*]] = load { i32, i32 }, ptr @g, align 4
23 ; CHECK-NEXT: ret { i32, i32 } [[V]]
25 %v = load { i32, i32 }, ptr @g