If that's true, we probably need to recanonicalize the shuffle if its the LHS went to UNDEF, but there's still something in RHS. We should move the RHS to LHS.<br><br><div class="gmail_quote">On Wed, Jan 11, 2012 at 2:32 PM, Rotem, Nadav <span dir="ltr"><<a href="mailto:nadav.rotem@intel.com">nadav.rotem@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Craig,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">It looks like some node (scalar_to_vector in our case) is legalized into an UNDEF and the result is replaced using "DAG.ReplaceAllUsesWith".  I don’t think
 that we can do much about it. Let's do what Duncan said.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Nadav<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:llvm-commits-bounces@cs.uiuc.edu" target="_blank">llvm-commits-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvm-commits-bounces@cs.uiuc.edu" target="_blank">llvm-commits-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Craig Topper<br>
<b>Sent:</b> Wednesday, January 11, 2012 19:58<br>
<b>To:</b> Duncan Sands<br>
<b>Cc:</b> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<b>Subject:</b> Re: [llvm-commits] VECTOR_SUFFLE in avx - fixed - Please review<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">r147525 added canonicalizing to DAGCombiner that should make shuffles of two undefs turn into an undef. Is that code not working correctly for this case?<br>
<br>
<u></u><u></u></p>
<div>
<p class="MsoNormal">On Wed, Jan 11, 2012 at 3:55 AM, Duncan Sands <<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal">Hi Elena,<u></u><u></u></p>
<div>
<p class="MsoNormal"><br>
> Fixed a bug in VECTOR_SHUFFLE<u></u><u></u></p>
</div>
<p class="MsoNormal">> lc: X86ISelLowering.cpp:6480: llvm::SDValue llvm::X86TargetLowering::LowerVECTOR_SHUFFLE(llvm::SDValue, llvm::SelectionDAG&) const: Assertion `V1.getOpcode() != ISD::UNDEF&&  "Op 1 of shuffle should not be undef"' failed.<br>

<br>
if V1 is undef but V2IsUndef is false then you can now fall through to the<br>
following code.  How about at restoring the assertion, but putting it after<br>
your test.  While there, maybe introduce V1IsUndef for neatness.<br>
<br>
Ciao, Duncan.<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
~Craig<u></u><u></u></p>
</div></div></div>
<font face="monospace">---------------------------------------------------------------------<div class="im"><br>
Intel Israel (74) Limited<br>
<br>
This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</div></font></div>

</blockquote></div><br><br clear="all"><br>-- <br>~Craig<br>