- %G = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
- %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
- %tmp3 = add <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
- store <4 x float> %tmp3, <4 x float>* %G
- %G = getelementptr <4 x float>* %G, int 0, int 0 ; <float*> [#uses=1]
- %tmp = load float* %G ; <float> [#uses=1]
- store float %tmp, float* %f
- ret void
+ %G = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
+ %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
+ %tmp3 = fadd <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
+ store <4 x float> %tmp3, <4 x float>* %G
+ %G.upgrd.5 = getelementptr <4 x float>* %G, i32 0, i32 0 ; <float*> [#uses=1]
+ %tmp.upgrd.6 = load float* %G.upgrd.5 ; <float> [#uses=1]
+ store float %tmp.upgrd.6, float* %f
+ ret void
+; CHECK: @test4
+; CHECK-NOT: alloca
+; CHECK: %tmp = load <4 x float>* %F
+; CHECK: fadd <4 x float> %tmp, %tmp
+; CHECK-NEXT: extractelement <4 x float> %tmp3, i32 0
+}
+
+define i32 @test5(float %X) { ;; should turn into bitcast.
+ %X_addr = alloca [4 x float]
+ %X1 = getelementptr [4 x float]* %X_addr, i32 0, i32 2
+ store float %X, float* %X1
+ %a = bitcast float* %X1 to i32*
+ %tmp = load i32* %a
+ ret i32 %tmp
+; CHECK: @test5
+; CHECK-NEXT: bitcast float %X to i32
+; CHECK-NEXT: ret i32
+}
+
+define i64 @test6(<2 x float> %X) {
+ %X_addr = alloca <2 x float>
+ store <2 x float> %X, <2 x float>* %X_addr
+ %P = bitcast <2 x float>* %X_addr to i64*
+ %tmp = load i64* %P
+ ret i64 %tmp
+; CHECK: @test6
+; CHECK: bitcast <2 x float> %X to i64
+; CHECK: ret i64