<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">> This isn't quite right. "#1, #30" is not canonical, for example (I</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">> only know this because I made the same mistake in my patch at first).</span><br>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Yes, indeed. Thanks for spotting that.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Mihai</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 22, 2013 at 11:46 AM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mihai,<br>
<br>
I think the approach is interesting, but a dead end. It cements the<br>
duplicated instructions rather than moving towards unification.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D1432" target="_blank">http://llvm-reviews.chandlerc.com/D1432</a> *does* move that way (and also<br>
converts "add r0, #0, #0" back into "add r0, #0" automatically).<br>
<br>
That said, I did have a look at the code and spotted this:<br>
<br>
+  static inline bool isSOImmCanonical(unsigned Val, unsigned Rot) {<br>
+    if (Rot == 0) return true;<br>
+    if (Val == 0 && Rot != 0) return false;<br>
+    return (Val % 4) != 0;<br>
+  }<br>
<br>
This isn't quite right. "#1, #30" is not canonical, for example (I<br>
only know this because I made the same mistake in my patch at first).<br>
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>