<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 28, 2014 at 3:52 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Aug 28, 2014 at 3:44 PM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">So, the problem is indeed the transformation, as it changes:<br>


<br>
   0x0002d6c8 <+276>: mov r4, r7<br>
   0x0002d6cc <+280>: ldr r0, [r4, #4]<br>
   0x0002d6d0 <+284>: ldr r1, [r8]<br>
   0x0002d6d4 <+288>: rsb r0, r0, #0<br>
   0x0002d6d8 <+292>: asr r0, r0, r6<br>
   0x0002d6dc <+296>: ldr r0, [r1, r0, lsl #2]<br>
   0x0002d6e0 <+300>: ldr r1, [r5]<br>
   0x0002d6e4 <+304>: ldr r0, [r0]<br>
<br>
into<br>
<br>
   0x0002d61c <+264>: mov r4, r5<br>
   0x0002d620 <+268>: ldr r0, [r4, #4]<br>
   0x0002d624 <+272>: ldr r1, [r8]<br>
   0x0002d628 <+276>: ldr r0, [r1, -r0]<br>
   0x0002d62c <+280>: ldr r1, [r7]<br>
   0x0002d630 <+284>: ldr r0, [r0]<br>
<br>
Note the -r0 versus (^r0>>r6)<<2, only that r0 is already negative<br>
when it gets to the load with offset. That's from the line:<br>
<br>
  fputs(S->name, stdout)<br>
<br>
with r0 as S->name, and r0 being 0x0 at the final load.<br>
<br>
Given that this transformation has also broken MIPS bots, I think we<br>
should revert it for now until better investigations are done.<br></blockquote><div><br></div></div><div>I'd be all for reverting it if we had LLVM IR that we can commit with the revert which shows the problem.</div>
</blockquote></div><br>I don't think its unreasonable to revert while we're getting the IR...</div></div>