[PATCH] D21746: [AVX512] Zero extend cmp intrinsic return value.

Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 01:21:24 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL274110: [AVX512]  Zero extend cmp intrinsic return value. (authored by ibreger).

Changed prior to commit:
  http://reviews.llvm.org/D21746?vs=61953&id=62185#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D21746

Files:
  cfe/trunk/lib/CodeGen/CGBuiltin.cpp
  cfe/trunk/test/CodeGen/avx512vl-builtins.c

Index: cfe/trunk/test/CodeGen/avx512vl-builtins.c
===================================================================
--- cfe/trunk/test/CodeGen/avx512vl-builtins.c
+++ cfe/trunk/test/CodeGen/avx512vl-builtins.c
@@ -8,6 +8,7 @@
 __mmask8 test_mm_cmpeq_epu32_mask(__m128i __a, __m128i __b) {
   // CHECK-LABEL: @test_mm_cmpeq_epu32_mask
   // CHECK: icmp eq <4 x i32> %{{.*}}, %{{.*}}
+  // CHECK: shufflevector <4 x i1> %{{.*}}, <4 x i1> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 4, i32 4, i32 4>
   return (__mmask8)_mm_cmpeq_epu32_mask(__a, __b);
 }
 
Index: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp
@@ -6460,8 +6460,8 @@
       Indices[i] = i;
     for (unsigned i = NumElts; i != 8; ++i)
       Indices[i] = NumElts;
-    Cmp = CGF.Builder.CreateShuffleVector(Cmp, UndefValue::get(Cmp->getType()),
-                                          Indices);
+    Cmp = CGF.Builder.CreateShuffleVector(
+        Cmp, llvm::Constant::getNullValue(Cmp->getType()), Indices);
   }
   return CGF.Builder.CreateBitCast(Cmp,
                                    IntegerType::get(CGF.getLLVMContext(),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21746.62185.patch
Type: text/x-patch
Size: 1258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160629/fa6d8952/attachment.bin>


More information about the cfe-commits mailing list