vpblend intrinsics combines as shifts intrinsics due to absence return stmt between...
authorRobert Khasanov <rob.khasanov@gmail.com>
Tue, 24 Jun 2014 18:08:04 +0000 (18:08 +0000)
committerRobert Khasanov <rob.khasanov@gmail.com>
Tue, 24 Jun 2014 18:08:04 +0000 (18:08 +0000)
Fix PR20088

Differential Revision: http://reviews.llvm.org/D4277

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211617 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pr20088.ll [new file with mode: 0644]

index e3fd0ce..874257f 100644 (file)
@@ -19188,6 +19188,8 @@ static SDValue PerformINTRINSIC_WO_CHAINCombine(SDNode *N, SelectionDAG &DAG,
       if (C->isAllOnesValue())
         return Op1;
     }
+
+    return SDValue();
   }
 
   // Packed SSE2/AVX2 arithmetic shift immediate intrinsics.
diff --git a/test/CodeGen/X86/pr20088.ll b/test/CodeGen/X86/pr20088.ll
new file mode 100644 (file)
index 0000000..d7aab7f
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llc < %s -mattr=+avx | FileCheck %s
+
+declare <16 x i8> @llvm.x86.sse41.pblendvb(<16 x i8>, <16 x i8>, <16 x i8>)
+
+define <16 x i8> @foo(<16 x i8> %x) {
+; CHECK: vpblendvb
+  %res = call <16 x i8> @llvm.x86.sse41.pblendvb(<16 x i8> zeroinitializer, <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>, <16 x i8> %x)
+  ret <16 x i8> %res;
+}