[PATCH] vpblend intrinsics combines as shifts intrinsics due to absence return stmt between them

Robert Khasanov rob.khasanov at gmail.com
Tue Jun 24 10:46:39 PDT 2014


Hi andreadb, nadav,

Fix PR20088

http://reviews.llvm.org/D4277

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/pr20088.ll

Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp
+++ lib/Target/X86/X86ISelLowering.cpp
@@ -19188,6 +19188,8 @@
       if (C->isAllOnesValue())
         return Op1;
     }
+
+    return SDValue();
   }
 
   // Packed SSE2/AVX2 arithmetic shift immediate intrinsics.
Index: test/CodeGen/X86/pr20088.ll
===================================================================
--- /dev/null
+++ test/CodeGen/X86/pr20088.ll
@@ -0,0 +1,12 @@
+; RUN: llc < %s -mattr=+avx | FileCheck %s
+
+; Function Attrs: nounwind readnone
+declare <16 x i8> @llvm.x86.sse41.pblendvb(<16 x i8>, <16 x i8>, <16 x i8>) #0
+
+; Function Attrs: nounwind
+define <16 x i8> @foo(<16 x i8> %x) #1 {
+; 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;
+}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4277.10796.patch
Type: text/x-patch
Size: 1014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140624/a2737775/attachment.bin>


More information about the llvm-commits mailing list