<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 8:35 PM, Ahmed Bougacha <span dir="ltr"><<a href="mailto:ahmed.bougacha@gmail.com" target="_blank">ahmed.bougacha@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Clang already has this: -fstrict-aliasing, which enables struct-path<br>
aware TBAA, via !tbaa metadata.<br></blockquote><div><br></div><div>There are plenty of cases it does not generate good tbaa or struct path tbaa. :)</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
That TBAA isn't sufficient is intentional though: you're probably<br>
hitting the return PartialAlias at the end of BasicAAResult::aliasGEP<br>
(PR9971).<br></blockquote><div><br></div><div>This is a different case, and easily resolvable with info that says it is part of a union or not.</div><div><br></div><div>At least, GCC does not pretend to okay non-explicit union accesses.</div><div>See <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892</a></div><div>and <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14319">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14319</a><br></div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<span class=""><font color="#888888"><br>
-Ahmed<br></font></span></blockquote><div><br></div></div></div></div>