[PATCH] D73342: Fix EarlyCSE to intersect aliasing metadata.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 09:46:12 PST 2020


hfinkel added a comment.

In D73342#1839006 <https://reviews.llvm.org/D73342#1839006>, @nikic wrote:

> In D73342#1838974 <https://reviews.llvm.org/D73342#1838974>, @jeroen.dobbelaere wrote:
>
> > Hal Finkel provided following example on the mailing list:
> >
> >   int * restrict r = a;
> >   ...
> >   int x = noaliasing ? *r : *a;
> >   
> >
> > This shows that the intersection of '*r' and '*a' must be taken.
>
>
> So, I guess that the reasoning here is that noalias loads are speculatable and noalias violation is thus poison (not immediate UB), so we can't make inferences from one load to the other. Does that capture it?


Yes. They don't need to be speculatable, but they certainly could be.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73342/new/

https://reviews.llvm.org/D73342





More information about the llvm-commits mailing list