From 8b1703fc1db8896db792573d2a86fd7a243382fd Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 28 Feb 2019 18:50:16 +0000 Subject: [PATCH] [X86] Add test case that was supposed to go with r355116. llvm-svn: 355117 --- llvm/test/CodeGen/X86/pr40891.ll | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 llvm/test/CodeGen/X86/pr40891.ll diff --git a/llvm/test/CodeGen/X86/pr40891.ll b/llvm/test/CodeGen/X86/pr40891.ll new file mode 100644 index 0000000..817e5e8 --- /dev/null +++ b/llvm/test/CodeGen/X86/pr40891.ll @@ -0,0 +1,22 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=avx2 | FileCheck %s + +; Make sure this sequence doesn't hang in DAG combine. + +define <8 x i32> @foo(<8 x i64> %x, <4 x i64> %y) { +; CHECK-LABEL: foo: +; CHECK: # %bb.0: +; CHECK-NEXT: vandps %ymm2, %ymm0, %ymm0 +; CHECK-NEXT: vandps {{\.LCPI.*}}, %ymm1, %ymm1 +; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm2 +; CHECK-NEXT: vshufps {{.*#+}} xmm0 = xmm0[0,2],xmm2[0,2] +; CHECK-NEXT: vextractf128 $1, %ymm1, %xmm2 +; CHECK-NEXT: vshufps {{.*#+}} xmm1 = xmm1[0,2],xmm2[0,2] +; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; CHECK-NEXT: retl + %a = shufflevector <4 x i64> %y, <4 x i64> , <8 x i32> + %b = and <8 x i64> %x, %a + %c = trunc <8 x i64> %b to <8 x i32> + ret <8 x i32> %c +} + -- 2.7.4