xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/pshufd-combine-crash.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 -mcpu=corei7 -debug
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; REQUIRES: asserts
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker; Test that the dag combiner doesn't assert if we try to replace a sequence of two
6*9880d681SAndroid Build Coastguard Worker; v4f32 X86ISD::PSHUFD nodes with a single PSHUFD.
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @test(<4 x float> %V) {
10*9880d681SAndroid Build Coastguard Worker  %1 = shufflevector <4 x float> %V, <4 x float> undef, <4 x i32> <i32 3, i32 0, i32 2, i32 1>
11*9880d681SAndroid Build Coastguard Worker  %2 = shufflevector <4 x float> %1, <4 x float> undef, <4 x i32> <i32 3, i32 0, i32 2, i32 1>
12*9880d681SAndroid Build Coastguard Worker  ret <4 x float> %2
13*9880d681SAndroid Build Coastguard Worker}
14*9880d681SAndroid Build Coastguard Worker
15