llvm.org GIT mirror llvm / 54d2402
filecheckize git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112695 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
1 changed file(s) with 25 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
None ; RUN: opt < %s -scalarrepl -S | not grep alloca
1 ; RUN: opt < %s -scalarrepl -S | grep {load <4 x float>}
0 ; RUN: opt < %s -scalarrepl -S | FileCheck %s
21 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
32
4 define void @test(<4 x float>* %F, float %f) {
3 define void @test1(<4 x float>* %F, float %f) {
54 entry:
65 %G = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
76 %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
1312 %tmp6 = fadd <4 x float> %tmp4, %tmp4 ; <<4 x float>> [#uses=1]
1413 store <4 x float> %tmp6, <4 x float>* %F
1514 ret void
15 ; CHECK: @test1
16 ; CHECK-NOT: alloca
17 ; CHECK: %tmp = load <4 x float>* %F
18 ; CHECK: fadd <4 x float> %tmp, %tmp
19 ; CHECK-NEXT: insertelement <4 x float> %tmp3, float %f, i32 0
1620 }
1721
1822 define void @test2(<4 x float>* %F, float %f) {
2731 %tmp6 = fadd <4 x float> %tmp4, %tmp4 ; <<4 x float>> [#uses=1]
2832 store <4 x float> %tmp6, <4 x float>* %F
2933 ret void
34 ; CHECK: @test2
35 ; CHECK-NOT: alloca
36 ; CHECK: %tmp = load <4 x float>* %F
37 ; CHECK: fadd <4 x float> %tmp, %tmp
38 ; CHECK-NEXT: insertelement <4 x float> %tmp3, float %f, i32 2
3039 }
3140
3241 define void @test3(<4 x float>* %F, float* %f) {
3948 %tmp.upgrd.4 = load float* %tmp.upgrd.3 ; [#uses=1]
4049 store float %tmp.upgrd.4, float* %f
4150 ret void
51 ; CHECK: @test3
52 ; CHECK-NOT: alloca
53 ; CHECK: %tmp = load <4 x float>* %F
54 ; CHECK: fadd <4 x float> %tmp, %tmp
55 ; CHECK-NEXT: extractelement <4 x float> %tmp3, i32 2
4256 }
4357
4458 define void @test4(<4 x float>* %F, float* %f) {
5165 %tmp.upgrd.6 = load float* %G.upgrd.5 ; [#uses=1]
5266 store float %tmp.upgrd.6, float* %f
5367 ret void
68 ; CHECK: @test4
69 ; CHECK-NOT: alloca
70 ; CHECK: %tmp = load <4 x float>* %F
71 ; CHECK: fadd <4 x float> %tmp, %tmp
72 ; CHECK-NEXT: extractelement <4 x float> %tmp3, i32 0
5473 }
5574
5675 define i32 @test5(float %X) { ;; should turn into bitcast.
6079 %a = bitcast float* %X1 to i32*
6180 %tmp = load i32* %a
6281 ret i32 %tmp
82 ; CHECK: @test5
83 ; CHECK-NEXT: bitcast float %X to i32
84 ; CHECK-NEXT: ret i32
6385 }
6486