OK , thanks for the explanation. This now LGTM. <br><div class="gmail_quote"><div dir="ltr">On Fri, 11 Dec 2015 at 19:30, Pirama Arumuga Nainar via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">pirama added a comment.<br>
<br>
Hi James,<br>
<br>
> Can you explain why this is necessary? Why is ASSERTZEXT not correct in this case?<br>
<br>
<br>
ASSERTZEXT does not generate any instructions but just records that its input operand is zero extended.  When I wrote this code initially, I incorrectly inserted this ASSERTZEXT while extending the result from i16 to i32.  That later causes the backend to assume that the top bits are zero and incorrectly use the 'orr' instruction (<a href="https://llvm.org/bugs/show_bug.cgi?id=25492" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=25492</a>).  Removing the ASSERTZEXT forces the backend to use uxth and pkhbt.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D15438" rel="noreferrer" target="_blank">http://reviews.llvm.org/D15438</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>