blob: 2bef24d443eb33516e651cd996420ccb8fe96a6e [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -mattr=+sse2 -o %t
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: grep punpck %t | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003; RUN: not grep pextrw %t
4
Tanya Lattner632e88a2008-02-21 07:42:26 +00005define <4 x i32> @test(i8** %ptr) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006entry:
Tanya Lattner632e88a2008-02-21 07:42:26 +00007 %tmp = load i8** %ptr ; <i8*> [#uses=1]
8 %tmp.upgrd.1 = bitcast i8* %tmp to float* ; <float*> [#uses=1]
9 %tmp.upgrd.2 = load float* %tmp.upgrd.1 ; <float> [#uses=1]
10 %tmp.upgrd.3 = insertelement <4 x float> undef, float %tmp.upgrd.2, i32 0 ; <<4 x float>> [#uses=1]
11 %tmp9 = insertelement <4 x float> %tmp.upgrd.3, float 0.000000e+00, i32 1 ; <<4 x float>> [#uses=1]
12 %tmp10 = insertelement <4 x float> %tmp9, float 0.000000e+00, i32 2 ; <<4 x float>> [#uses=1]
13 %tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, i32 3 ; <<4 x float>> [#uses=1]
14 %tmp21 = bitcast <4 x float> %tmp11 to <16 x i8> ; <<16 x i8>> [#uses=1]
15 %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]
16 %tmp31 = bitcast <16 x i8> %tmp22 to <8 x i16> ; <<8 x i16>> [#uses=1]
17 %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]
18 %tmp36 = bitcast <8 x i16> %tmp.upgrd.4 to <4 x i32> ; <<4 x i32>> [#uses=1]
19 ret <4 x i32> %tmp36
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020}