summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/shuffle-combine-crash.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/shuffle-combine-crash.ll')
-rw-r--r--llvm/test/CodeGen/X86/shuffle-combine-crash.ll15
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/shuffle-combine-crash.ll b/llvm/test/CodeGen/X86/shuffle-combine-crash.ll
index 06fcaa97389..4141e7edaa7 100644
--- a/llvm/test/CodeGen/X86/shuffle-combine-crash.ll
+++ b/llvm/test/CodeGen/X86/shuffle-combine-crash.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 | FileCheck %s
; Verify that DAGCombiner does not crash when checking if it is
; safe to fold the shuffles in function @sample_test according to rule
@@ -15,6 +16,18 @@
; As a consequence, compiling the function below would have caused a crash.
define void @sample_test() {
+; CHECK-LABEL: sample_test:
+; CHECK: # %bb.0:
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: testb %al, %al
+; CHECK-NEXT: jne .LBB0_2
+; CHECK-NEXT: # %bb.1:
+; CHECK-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
+; CHECK-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
+; CHECK-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
+; CHECK-NEXT: movd %xmm0, (%rax)
+; CHECK-NEXT: .LBB0_2:
+; CHECK-NEXT: retq
br i1 undef, label %5, label %1
; <label>:1 ; preds = %0
OpenPOWER on IntegriCloud