summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/pshufd-combine-crash.ll
blob: 84c69e32bcc3fad856041c25d414e34c8e3056f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llc < %s -march=x86-64 -mcpu=corei7 -debug

; REQUIRES: asserts

; Test that the dag combiner doesn't assert if we try to replace a sequence of two
; v4f32 X86ISD::PSHUFD nodes with a single PSHUFD.


define <4 x float> @test(<4 x float> %V) {
  %1 = shufflevector <4 x float> %V, <4 x float> undef, <4 x i32> <i32 3, i32 0, i32 2, i32 1>
  %2 = shufflevector <4 x float> %1, <4 x float> undef, <4 x i32> <i32 3, i32 0, i32 2, i32 1>
  ret <4 x float> %2
}