1 ; Verify that section assignment is copied during SROA
2 ; RUN: opt < %s -globalopt -S | FileCheck %s
4 ; CHECK: section ".foo"
6 ; CHECK: section ".foo"
8 ; CHECK: section ".foo"
10 %T = type { double, double, double }
11 @G = internal global %T zeroinitializer, align 16, section ".foo"
14 store double 1.0, double* getelementptr (%T, %T* @G, i32 0, i32 0), align 16
15 store double 2.0, double* getelementptr (%T, %T* @G, i32 0, i32 1), align 8
16 store double 3.0, double* getelementptr (%T, %T* @G, i32 0, i32 2), align 16
20 define double @test2() {
21 %V1 = load double, double* getelementptr (%T, %T* @G, i32 0, i32 0), align 16
22 %V2 = load double, double* getelementptr (%T, %T* @G, i32 0, i32 1), align 8
23 %V3 = load double, double* getelementptr (%T, %T* @G, i32 0, i32 2), align 16
24 %R = fadd double %V1, %V2
25 %R2 = fadd double %R, %V3