[PATCH] Fix for bug 21725: wrong results with union and strict-aliasing
jeroen.dobbelaere at gmail.com
Fri Mar 20 13:37:47 PDT 2015
Getting more detailed tbaa information (for both, the access and the
structure content) should help for this case.
On Fri, Mar 20, 2015 at 9:01 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> So, on that review thread Nick, sadly, pointed out a difference between
> language and llvm level analysis.
> void test_s03c(struct S03* a, struct S03* b)
> // c++11: NoAlias
> // llvm: MayAlias ******** performance
> // future: NoAlias
> (Assuming for a second that we all agree they are NoAlias at the C++ level.
> You can make these alias at the LLVM level using negative GEPs to make
> the a and b pointers go to the same place (and while I had noticed this at
> the local level, nick deviously pointed out it could have happened in our
> The good news is nick believes it's still possible to get this
> optimization back in some cases :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits