<div>FWIW, doesn't this just need a may_alias attribute on the definition?<div class="gmail_quote"><div>On Wed, Jul 5, 2017 at 2:39 PM James Y Knight via Phabricator via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">jyknight added a comment.<br>
<br>
Ping. I don't think this got resolved, and I really wouldn't like to see  released in this state...can you either revert this from the library, or implement the compiler support, before the 5.0 release branch?<br>
<br>
In <a href="https://reviews.llvm.org/D31022#716702" rel="noreferrer" target="_blank">https://reviews.llvm.org/D31022#716702</a>, @jyknight wrote:<br>
<br>
> I believe this needs compiler support, too, in order to treat<br>
><br>
>   namespace std { enum class byte : unsigned char {}; }<br>
><br>
> as directly having tbaa type "omnipotent char" instead of a subtype.<br>
><br>
> That is, given:<br>
><br>
>   void foo(char* x, int *y) {<br>
>     x[1] = char(y[0] & 0xff);<br>
>     x[0] = char((y[0] & 0xff00) >> 8);<br>
>   }<br>
><br>
> the compiler assumes that x and y might alias each-other, and thus must have two loads of y[0]. If you replace "char" with "std::byte", the same should happen, but as of now does not.<br>
<br>
<br>
<br>
<br>
<br>
<a href="https://reviews.llvm.org/D31022" rel="noreferrer" target="_blank">https://reviews.llvm.org/D31022</a><br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div>