xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/dagcombine-buildvector.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mcpu=penryn | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Shows a dag combine bug that will generate an illegal build vector
4*9880d681SAndroid Build Coastguard Worker; with v2i64 build_vector i32, i32.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test:
7*9880d681SAndroid Build Coastguard Worker; CHECK: unpcklpd
8*9880d681SAndroid Build Coastguard Worker; CHECK: movapd
9*9880d681SAndroid Build Coastguard Workerdefine void @test(<2 x double>* %dst, <4 x double> %src) nounwind {
10*9880d681SAndroid Build Coastguard Workerentry:
11*9880d681SAndroid Build Coastguard Worker        %tmp7.i = shufflevector <4 x double> %src, <4 x double> undef, <2 x i32> < i32 0, i32 2 >
12*9880d681SAndroid Build Coastguard Worker        store <2 x double> %tmp7.i, <2 x double>* %dst
13*9880d681SAndroid Build Coastguard Worker        ret void
14*9880d681SAndroid Build Coastguard Worker}
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test2:
17*9880d681SAndroid Build Coastguard Worker; CHECK: movdqa
18*9880d681SAndroid Build Coastguard Workerdefine void @test2(<4 x i16>* %src, <4 x i32>* %dest) nounwind {
19*9880d681SAndroid Build Coastguard Workerentry:
20*9880d681SAndroid Build Coastguard Worker        %tmp1 = load <4 x i16>, <4 x i16>* %src
21*9880d681SAndroid Build Coastguard Worker        %tmp3 = shufflevector <4 x i16> %tmp1, <4 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
22*9880d681SAndroid Build Coastguard Worker        %0 = tail call <4 x i32> @llvm.x86.sse41.pmovzxwd(<8 x i16> %tmp3)
23*9880d681SAndroid Build Coastguard Worker        store <4 x i32> %0, <4 x i32>* %dest
24*9880d681SAndroid Build Coastguard Worker        ret void
25*9880d681SAndroid Build Coastguard Worker}
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Workerdeclare <4 x i32> @llvm.x86.sse41.pmovzxwd(<8 x i16>) nounwind readnone
28