diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-09-01 05:10:14 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-09-01 05:10:14 +0000 | 
| commit | b9ed4f252fdc408a83d183602b7eb9a02fda88c2 (patch) | |
| tree | 07cf63755e4788a9456b0905fb1d9b96e87a00ce /llvm/test/Transforms | |
| parent | b3825216cea35a7d8c6f76a8339053c0c8ca8fd4 (diff) | |
| download | bcm5719-llvm-b9ed4f252fdc408a83d183602b7eb9a02fda88c2.tar.gz bcm5719-llvm-b9ed4f252fdc408a83d183602b7eb9a02fda88c2.zip  | |
filecheckize
llvm-svn: 112695
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/ScalarRepl/vector_promote.ll | 28 | 
1 files changed, 25 insertions, 3 deletions
diff --git a/llvm/test/Transforms/ScalarRepl/vector_promote.ll b/llvm/test/Transforms/ScalarRepl/vector_promote.ll index 4f875b0841b..dd4251bde98 100644 --- a/llvm/test/Transforms/ScalarRepl/vector_promote.ll +++ b/llvm/test/Transforms/ScalarRepl/vector_promote.ll @@ -1,8 +1,7 @@ -; RUN: opt < %s -scalarrepl -S | not grep alloca -; RUN: opt < %s -scalarrepl -S | grep {load <4 x float>} +; RUN: opt < %s -scalarrepl -S | FileCheck %s  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" -define void @test(<4 x float>* %F, float %f) { +define void @test1(<4 x float>* %F, float %f) {  entry:  	%G = alloca <4 x float>, align 16		; <<4 x float>*> [#uses=3]  	%tmp = load <4 x float>* %F		; <<4 x float>> [#uses=2] @@ -14,6 +13,11 @@ entry:  	%tmp6 = fadd <4 x float> %tmp4, %tmp4		; <<4 x float>> [#uses=1]  	store <4 x float> %tmp6, <4 x float>* %F  	ret void +; CHECK: @test1 +; CHECK-NOT: alloca +; CHECK: %tmp = load <4 x float>* %F +; CHECK: fadd <4 x float> %tmp, %tmp +; CHECK-NEXT: insertelement <4 x float> %tmp3, float %f, i32 0  }  define void @test2(<4 x float>* %F, float %f) { @@ -28,6 +32,11 @@ entry:  	%tmp6 = fadd <4 x float> %tmp4, %tmp4		; <<4 x float>> [#uses=1]  	store <4 x float> %tmp6, <4 x float>* %F  	ret void +; CHECK: @test2 +; CHECK-NOT: alloca +; CHECK: %tmp = load <4 x float>* %F +; CHECK: fadd <4 x float> %tmp, %tmp +; CHECK-NEXT: insertelement <4 x float> %tmp3, float %f, i32 2  }  define void @test3(<4 x float>* %F, float* %f) { @@ -40,6 +49,11 @@ entry:  	%tmp.upgrd.4 = load float* %tmp.upgrd.3		; <float> [#uses=1]  	store float %tmp.upgrd.4, float* %f  	ret void +; CHECK: @test3 +; 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 2  }  define void @test4(<4 x float>* %F, float* %f) { @@ -52,6 +66,11 @@ entry:  	%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. @@ -61,5 +80,8 @@ define i32 @test5(float %X) {  ;; should turn into bitcast.  	%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  }  | 

