spatel added a comment.

In https://reviews.llvm.org/D30834#698346, @craig.topper wrote:

> Have you ran the tests all the way through to assembly and made sure we don't 
> regress? If we do regress, I wouldn't hold up fixing this, but we should at 
> least have bugs for what breaks.


Yes - I spot-checked several of the shuffle cases, and we always catch those 
even at -O0. As noted in the PR, we get those in the backend or InstCombine if 
optimization is on.

The AVX2 gathers regress (we have an xor for the dummy register operand), and 
of course the undef intrinsics themselves now have an xor. If you know where 
those undef intrinsics are intended to be used, I can try that too. There's no 
problem with the pcmpeqd example in the bug report. I'll file a new PR for the 
gathers once this goes in and link to PR32176.



================
Comment at: lib/CodeGen/CGBuiltin.cpp:7384
   case X86::BI__builtin_ia32_undef512:
-    return UndefValue::get(ConvertType(E->getType()));
+    // The x86 definition of "undef" is not the same as the LLVM definition
+    // (PR32176). We leave the exercise of optimizing away an unnecessary zero
----------------
craig.topper wrote:
> Do we want to leave a TODO here to maybe do something different when we have 
> freeze?
Sure - I'll add that.


https://reviews.llvm.org/D30834



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to