1 ; RUN: opt < %s -scalarrepl -S | not grep alloca
4 ;; Store of integer to whole alloca struct.
5 define i32 @test1(i64 %V) nounwind {
6 %X = alloca {{i32, i32}}
7 %Y = bitcast {{i32,i32}}* %X to i64*
10 %A = getelementptr {{i32,i32}}* %X, i32 0, i32 0, i32 0
11 %B = getelementptr {{i32,i32}}* %X, i32 0, i32 0, i32 1
18 ;; Store of integer to whole struct/array alloca.
19 define float @test2(i128 %V) nounwind {
20 %X = alloca {[4 x float]}
21 %Y = bitcast {[4 x float]}* %X to i128*
22 store i128 %V, i128* %Y
24 %A = getelementptr {[4 x float]}* %X, i32 0, i32 0, i32 0
25 %B = getelementptr {[4 x float]}* %X, i32 0, i32 0, i32 3
28 %c = fadd float %a, %b
32 ;; Load of whole alloca struct as integer
33 define i64 @test3(i32 %a, i32 %b) nounwind {
34 %X = alloca {{i32, i32}}
36 %A = getelementptr {{i32,i32}}* %X, i32 0, i32 0, i32 0
37 %B = getelementptr {{i32,i32}}* %X, i32 0, i32 0, i32 1
41 %Y = bitcast {{i32,i32}}* %X to i64*
46 ;; load of integer from whole struct/array alloca.
47 define i128 @test4(float %a, float %b) nounwind {
48 %X = alloca {[4 x float]}
49 %A = getelementptr {[4 x float]}* %X, i32 0, i32 0, i32 0
50 %B = getelementptr {[4 x float]}* %X, i32 0, i32 0, i32 3
51 store float %a, float* %A
52 store float %b, float* %B
54 %Y = bitcast {[4 x float]}* %X to i128*