<div dir="ltr">On 5 November 2013 17:30, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">



<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">The test passes even with the code change reverted.<br></blockquote>

<div><br></div><div>Bah! Thanks for noticing. The testcase worked in C++ mode but not C mode.</div><div><br></div><div>Adding it to test/CodeGenCXX/catch-undef-behavior.cpp doesn't work well either because of ordering dependencies in that test.</div>

<div><br></div><div>Updated patch attached!</div><div><br></div><div>Nick</div><div><br></div><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">



<div><div>On 5 November 2013 16:54, Nick Lewycky <<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>> wrote:<br>
> When lowering "cond ? X : Y" we do some safety checks to see whether we can<br>
> instead emit both X and Y and use a llvm select instruction to choose<br>
> between them. This code is insufficiently safe, and introducing loads into a<br>
> program that didn't load is a bad idea. For example, it could be TLS. It<br>
> could be a non-volatile auto in another function that isn't the current<br>
> function (think lambdas).<br>
><br>
> Don't do this here. LLVM knows how to do this properly.<br>
><br>
> Patch attached, please review!<br>
><br>
> Nick<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</blockquote></div><br></div></div>