<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<span class=""><br>
> It would require semantic changes to llvm ir to fix this to properly<br>
> express object lifetimes that is compatible with all the random babble<br>
> standards have written down :)<br>
> For now, the only sane solution IMHO, is to say that no alias implies<br>
> pointer inequality, regardless of the standards. Because the above can<br>
> occur in any situation noalias exists but they are allowed to be pointer<br>
> equal (as mentioned, it's trivial to make this happen in TBAA).<br>
<br>
</span>Just to be clear, you're suggesting that we no longer mark malloc's<br>
return value as noalias?<br></blockquote><div><br></div><div>Actually, i'd suggest just letting it be a bug :)</div><div>That's what other compilers seem to do.</div><div>You could hack around this in clang by using the !alias.scope and !noalias form, and not attaching the scope past the lifetime end.<br></div><div><br></div><div>But we don't optimize that.</div><div><br></div></div></div></div>