<div dir="ltr">This change codgens to something really awful now. Can you take a look?<div><br></div><div><div><span class="" style="white-space:pre"> </span>.section<span class="" style="white-space:pre"> </span>__TEXT,__text,regular,pure_instructions</div><div><span class="" style="white-space:pre"> </span>.section<span class="" style="white-space:pre"> </span>__TEXT,__literal8,8byte_literals</div><div><span class="" style="white-space:pre"> </span>.p2align<span class="" style="white-space:pre"> </span>3</div><div>LCPI0_0:</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>-1</div><div><span class="" style="white-space:pre"> </span>.section<span class="" style="white-space:pre"> </span>__TEXT,__const</div><div><span class="" style="white-space:pre"> </span>.p2align<span class="" style="white-space:pre"> </span>6</div><div>LCPI0_1:</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>0</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>1</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>2</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>3</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>8</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>8</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>8</div><div><span class="" style="white-space:pre"> </span>.quad<span class="" style="white-space:pre"> </span>8</div><div><span class="" style="white-space:pre"> </span>.section<span class="" style="white-space:pre"> </span>__TEXT,__text,regular,pure_instructions</div><div><span class="" style="white-space:pre"> </span>.globl<span class="" style="white-space:pre"> </span>_test_mm_cmpeq_epu32_mask</div><div><span class="" style="white-space:pre"> </span>.p2align<span class="" style="white-space:pre"> </span>4, 0x90</div><div>_test_mm_cmpeq_epu32_mask:</div><div><span class="" style="white-space:pre"> </span>vpcmpeqd<span class="" style="white-space:pre"> </span>%xmm1, %xmm0, %k1</div><div><span class="" style="white-space:pre"> </span>vpbroadcastq<span class="" style="white-space:pre"> </span>LCPI0_0(%rip), %zmm0 {%k1} {z}</div><div><span class="" style="white-space:pre"> </span>vpxord<span class="" style="white-space:pre"> </span>%zmm1, %zmm1, %zmm1</div><div><span class="" style="white-space:pre"> </span>vmovdqa64<span class="" style="white-space:pre"> </span>LCPI0_1(%rip), %zmm2</div><div><span class="" style="white-space:pre"> </span>vpermt2q<span class="" style="white-space:pre"> </span>%zmm1, %zmm2, %zmm0</div><div><span class="" style="white-space:pre"> </span>vpsllq<span class="" style="white-space:pre"> </span>$63, %zmm0, %zmm0</div><div><span class="" style="white-space:pre"> </span>vptestmq<span class="" style="white-space:pre"> </span>%zmm0, %zmm0, %k0</div><div><span class="" style="white-space:pre"> </span>kmovw<span class="" style="white-space:pre"> </span>%k0, %eax</div><div><span class="" style="white-space:pre"> </span>retq</div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Wed, Jun 29, 2016 at 1:14 AM, Igor Breger via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ibreger<br>
Date: Wed Jun 29 03:14:17 2016<br>
New Revision: 274110<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=274110&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=274110&view=rev</a><br>
Log:<br>
[AVX512] Zero extend cmp intrinsic return value.<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D21746" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21746</a><br>
<br>
Modified:<br>
cfe/trunk/lib/CodeGen/CGBuiltin.cpp<br>
cfe/trunk/test/CodeGen/avx512vl-builtins.c<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=274110&r1=274109&r2=274110&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=274110&r1=274109&r2=274110&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Jun 29 03:14:17 2016<br>
@@ -6460,8 +6460,8 @@ static Value *EmitX86MaskedCompare(CodeG<br>
Indices[i] = i;<br>
for (unsigned i = NumElts; i != 8; ++i)<br>
Indices[i] = NumElts;<br>
- Cmp = CGF.Builder.CreateShuffleVector(Cmp, UndefValue::get(Cmp->getType()),<br>
- Indices);<br>
+ Cmp = CGF.Builder.CreateShuffleVector(<br>
+ Cmp, llvm::Constant::getNullValue(Cmp->getType()), Indices);<br>
}<br>
return CGF.Builder.CreateBitCast(Cmp,<br>
IntegerType::get(CGF.getLLVMContext(),<br>
<br>
Modified: cfe/trunk/test/CodeGen/avx512vl-builtins.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512vl-builtins.c?rev=274110&r1=274109&r2=274110&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512vl-builtins.c?rev=274110&r1=274109&r2=274110&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/avx512vl-builtins.c (original)<br>
+++ cfe/trunk/test/CodeGen/avx512vl-builtins.c Wed Jun 29 03:14:17 2016<br>
@@ -8,6 +8,7 @@<br>
__mmask8 test_mm_cmpeq_epu32_mask(__m128i __a, __m128i __b) {<br>
// CHECK-LABEL: @test_mm_cmpeq_epu32_mask<br>
// CHECK: icmp eq <4 x i32> %{{.*}}, %{{.*}}<br>
+ // 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><br>
return (__mmask8)_mm_cmpeq_epu32_mask(__a, __b);<br>
}<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>