xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/2007-05-17-ShuffleISelBug.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: punpckhwd
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdeclare <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16>, <8 x i16>)
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdeclare <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16>, <8 x i16>)
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerdefine fastcc void @test(i32* %src, i32 %sbpr, i32* %dst, i32 %dbpr, i32 %w, i32 %h, i32 %dstalpha, i32 %mask) {
10*9880d681SAndroid Build Coastguard Worker	%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 >
11*9880d681SAndroid Build Coastguard Worker	%tmp715 = mul <8 x i16> zeroinitializer, %tmp633
12*9880d681SAndroid Build Coastguard Worker	%tmp776 = bitcast <8 x i16> %tmp715 to <4 x i32>
13*9880d681SAndroid Build Coastguard Worker	%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)
14*9880d681SAndroid Build Coastguard Worker	%tmp805 = add <4 x i32> %tmp777, zeroinitializer
15*9880d681SAndroid Build Coastguard Worker	%tmp832 = bitcast <4 x i32> %tmp805 to <8 x i16>
16*9880d681SAndroid Build Coastguard Worker	%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 > )
17*9880d681SAndroid Build Coastguard Worker	%tmp1020 = tail call <16 x i8> @llvm.x86.sse2.packuswb.128( <8 x i16> zeroinitializer, <8 x i16> %tmp838 )
18*9880d681SAndroid Build Coastguard Worker	%tmp1030 = bitcast <16 x i8> %tmp1020 to <4 x i32>
19*9880d681SAndroid Build Coastguard Worker	%tmp1033 = add <4 x i32> zeroinitializer, %tmp1030
20*9880d681SAndroid Build Coastguard Worker	%tmp1048 = bitcast <4 x i32> %tmp1033 to <2 x i64>
21*9880d681SAndroid Build Coastguard Worker	%tmp1049 = or <2 x i64> %tmp1048, zeroinitializer
22*9880d681SAndroid Build Coastguard Worker	store <2 x i64> %tmp1049, <2 x i64>* null
23*9880d681SAndroid Build Coastguard Worker	ret void
24*9880d681SAndroid Build Coastguard Worker}
25