<p dir="ltr">Ah, yes. Makes sense. LGTM. </p>
<p dir="ltr">Thanks! <br>
Renato </p>
<div class="gmail_quote">On 12 May 2014 18:36, "Louis Gerbarg" <<a href="mailto:lgg@apple.com">lgg@apple.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On May 10, 2014, at 1:32 PM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:<br>
<br>
> On 9 May 2014 23:27, Louis Gerbarg <<a href="mailto:lgg@apple.com">lgg@apple.com</a>> wrote:<br>
>> Currently most __builtin_bswap16() intrinsics from the frontend end up generating sup-optimal code due to legalization promoting some of the operands to i32s during load/stores. That results in the backend generating a rev and an lsr instead of a rev16. This patch adds patterns that catch those situations and generate a rev16.<br>

><br>
> Hi Louis,<br>
><br>
> Nice catch. Though, on current trunk, your test2 is already producing<br>
> rev16 on both ARM and Thumb.<br>
<br>
Yes it is, but there is no test case for it. Since I was in the neighborhood anyway it seemed prudent to add it (also, I wanted to make sure i didn’t inadvertently break it when I was poking around).<br>
<br>
Louis</blockquote></div>