[PATCH] D73342: Fix EarlyCSE to intersect aliasing metadata.
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 08:41:01 PST 2020
jeroen.dobbelaere added a comment.
In D73342#1838953 <https://reviews.llvm.org/D73342#1838953>, @nikic wrote:
> Can you explain in more detail why the current behavior is incorrect? Why is using the aliasing information in program order wrong? If the first load is noalias, then we should be able to deduplicate to that noalias load. If the second load is noalias, then generally we can't assume the first load is also noalias. Unless there is a must-exec relation between them, as @nlopes mentioned.
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.
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