[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 09:51:06 PST 2020
jdoerfert added a comment.
In D74935#1907100 <https://reviews.llvm.org/D74935#1907100>, @jeroen.dobbelaere wrote:
> Just to give an example:
>
> int foo(int* restrict *pA, int* restrict *pB) {
> int tmp=**pB;
> **pA=42;
> return tmp - **pB; // **pA and **pB can refer to the same objects
> }
>
>
> [...]
`*pA` and `*pB` are both restrict qualified pointers, are they not?
If so, why can they point to the same location?
I mean, w/o the side channel stuff the two `int *` values may alias
even if you have `noalias` on the arguments (https://godbolt.org/z/J9v_gK).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74935/new/
https://reviews.llvm.org/D74935
More information about the cfe-commits
mailing list