<div dir="ltr">Jim, the problem is the code is running after legalize types so its leaving MVT::i64 nodes that aren't valid in 64-bit mode.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 10, 2014 at 2:56 PM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
<br>
================<br>
Comment at: lib/Target/X86/X86ISelLowering.cpp:18070<br>
@@ -18062,1 +18069,3 @@<br>
</div><div class="">+ }<br>
+<br>
SDValue ANDed = DAG.getNode(ISD::AND, DL, IntVT, OnesOrZeroesI,<br>
</div>----------------<br>
<div class="">Jim Grosbach wrote:<br>
> This seems very strange. Why do we not want to perform the operations in 64-bits here? It's still 64-bit data whether we're in 64-bit mode or not, right?<br>
><br>
> Can you elaborate a bit on what's actually going wrong here?<br>
</div>(I'm new to this so please correct me if I seem confused here..)<br>
<div class=""><br>
> This seems very strange. Why do we not want to perform the operations in 64-bits<br>
> here? It's still 64-bit data whether we're in 64-bit mode or not, right?<br>
<br>
</div>This runs after the DAG has been legalized. If we generate a 64-bit ISD::BITCAST node, we'll select an instruction that moves to a 64-bit integer register, e.g. "movd %xmm1, %rax", which obviously doesn't work well when targeting 32-bit.<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D3009" target="_blank">http://llvm-reviews.chandlerc.com/D3009</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>~Craig
</div>