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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 08:59:04 PST 2020


nikic added a comment.

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?


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