blob: b27ef836960fcaca563e9c3655342072f83c3b1b [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -mattr=+sse2
2; RUN: llc < %s -march=x86 -mattr=+sse2 | not grep punpckhwd
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Eric Christopher45535af2009-11-06 00:11:57 +00004declare <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16>, <8 x i16>)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
Evan Cheng6071cc02008-01-09 02:16:44 +00006declare <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16>, <8 x i16>)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007
8define fastcc void @test(i32* %src, i32 %sbpr, i32* %dst, i32 %dbpr, i32 %w, i32 %h, i32 %dstalpha, i32 %mask) {
9 %tmp633 = shufflevector <8 x i16> zeroinitializer, <8 x i16> undef, <8 x i32> < i32 4, i32 4, i32 5, i32 5, i32 6, i32 6, i32 7, i32 7 >
10 %tmp715 = mul <8 x i16> zeroinitializer, %tmp633
11 %tmp776 = bitcast <8 x i16> %tmp715 to <4 x i32>
12 %tmp777 = add <4 x i32> %tmp776, shufflevector (<4 x i32> < i32 65537, i32 0, i32 0, i32 0 >, <4 x i32> < i32 65537, i32 0, i32 0, i32 0 >, <4 x i32> zeroinitializer)
13 %tmp805 = add <4 x i32> %tmp777, zeroinitializer
14 %tmp832 = bitcast <4 x i32> %tmp805 to <8 x i16>
Evan Cheng6071cc02008-01-09 02:16:44 +000015 %tmp838 = tail call <8 x i16> @llvm.x86.sse2.psrl.w( <8 x i16> %tmp832, <8 x i16> < i16 8, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef > )
Eric Christopher45535af2009-11-06 00:11:57 +000016 %tmp1020 = tail call <16 x i8> @llvm.x86.sse2.packuswb.128( <8 x i16> zeroinitializer, <8 x i16> %tmp838 )
17 %tmp1030 = bitcast <16 x i8> %tmp1020 to <4 x i32>
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018 %tmp1033 = add <4 x i32> zeroinitializer, %tmp1030
19 %tmp1048 = bitcast <4 x i32> %tmp1033 to <2 x i64>
20 %tmp1049 = or <2 x i64> %tmp1048, zeroinitializer
21 store <2 x i64> %tmp1049, <2 x i64>* null
22 ret void
23}