Improve the grep commands for this test to be tolerant of ABI
[oota-llvm.git] / test / CodeGen / X86 / vec_shuffle-9.ll
index e83e2984d463531814e16b3f894ceb5c1f7a2630..68577d455f756169d7a7c2044a16d8c9543dc494 100644 (file)
@@ -1,20 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f
-; RUN: grep punpck %t | wc -l | grep 2
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
+; RUN: grep punpck %t | count 2
 ; RUN: not grep pextrw %t
 
-<4 x int> %test(sbyte** %ptr) {
+define <4 x i32> @test(i8** %ptr) {
 entry:
-       %tmp = load sbyte** %ptr
-       %tmp = cast sbyte* %tmp to float*
-       %tmp = load float* %tmp
-       %tmp = insertelement <4 x float> undef, float %tmp, uint 0
-       %tmp9 = insertelement <4 x float> %tmp, float 0.000000e+00, uint 1
-       %tmp10 = insertelement <4 x float> %tmp9, float 0.000000e+00, uint 2
-       %tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, uint 3
-       %tmp21 = cast <4 x float> %tmp11 to <16 x sbyte>
-       %tmp22 = shufflevector <16 x sbyte> %tmp21, <16 x sbyte> zeroinitializer, <16 x uint> < uint 0, uint 16, uint 1, uint 17, uint 2, uint 18, uint 3, uint 19, uint 4, uint 20, uint 5, uint 21, uint 6, uint 22, uint 7, uint 23 >
-       %tmp31 = cast <16 x sbyte> %tmp22 to <8 x short>
-       %tmp = shufflevector <8 x short> zeroinitializer, <8 x short> %tmp31, <8 x uint> < uint 0, uint 8, uint 1, uint 9, uint 2, uint 10, uint 3, uint 11 >
-       %tmp36 = cast <8 x short> %tmp to <4 x int>
-       ret <4 x int> %tmp36
+       %tmp = load i8** %ptr           ; <i8*> [#uses=1]
+       %tmp.upgrd.1 = bitcast i8* %tmp to float*               ; <float*> [#uses=1]
+       %tmp.upgrd.2 = load float* %tmp.upgrd.1         ; <float> [#uses=1]
+       %tmp.upgrd.3 = insertelement <4 x float> undef, float %tmp.upgrd.2, i32 0               ; <<4 x float>> [#uses=1]
+       %tmp9 = insertelement <4 x float> %tmp.upgrd.3, float 0.000000e+00, i32 1               ; <<4 x float>> [#uses=1]
+       %tmp10 = insertelement <4 x float> %tmp9, float 0.000000e+00, i32 2             ; <<4 x float>> [#uses=1]
+       %tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, i32 3            ; <<4 x float>> [#uses=1]
+       %tmp21 = bitcast <4 x float> %tmp11 to <16 x i8>                ; <<16 x i8>> [#uses=1]
+       %tmp22 = shufflevector <16 x i8> %tmp21, <16 x i8> zeroinitializer, <16 x i32> < i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23 >               ; <<16 x i8>> [#uses=1]
+       %tmp31 = bitcast <16 x i8> %tmp22 to <8 x i16>          ; <<8 x i16>> [#uses=1]
+       %tmp.upgrd.4 = shufflevector <8 x i16> zeroinitializer, <8 x i16> %tmp31, <8 x i32> < i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11 >                ; <<8 x i16>> [#uses=1]
+       %tmp36 = bitcast <8 x i16> %tmp.upgrd.4 to <4 x i32>            ; <<4 x i32>> [#uses=1]
+       ret <4 x i32> %tmp36
 }