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

Robert Khasanov rob.khasanov at gmail.com
Tue Jun 24 11:07:25 PDT 2014


Hi Andrea,

Thanks for review, patch is updated

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,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;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4277.10797.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140624/4611c7e2/attachment.bin>


More information about the llvm-commits mailing list