Rafael,<div><br></div><div>Thanks for that investigation, it's obviously not worth any effort to fix.</div><div><br></div><div>Thanks!</div><div><br></div><div>James</div><br><div class="gmail_quote">On 4 June 2013 21:02, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@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="im">> Like a divide operation where the divisor never happens to be zero? or am I<br>
> misunderstanding the patch?<br>
><br>
> My understanding is that now we will not hoist divides out of induction<br>
> variable expressions where before we did, because divides can trap. Most<br>
> divides in user code don't trap, so I don't see how you can conclude that<br>
> the optimization is not firing on user code.<br>
<br>
</div>I have applied the attached patch to llvm. With it I was able to<br>
bootstrap clang and build the test-suite (with "lnt runtest nt<br>
--sandbox /home/espindola/llvm/test-suite-obj --cc<br>
~/llvm/build/bin/clang --test-suite /home/espindola/llvm/test-suite<br>
--simple -j 8").<br>
<br>
In fact, the only thing that I got a failure on was during check-all<br>
where Transforms/IndVarSimplify/udiv-invariant-but-traps.ll hits the<br>
assert (as expected).<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br>