[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 16:55:51 PST 2020


aqjune added a comment.

Hi,
The term 'object' seems ambiguous to me. For example,

  void f(i32* noalias x, i32* noalias y) {
    *x = 1;
    *y = 2;
  }
  
  int x[2];
  f(&x[0], &x[1]);

If object means an allocation, this should be UB, because x and y are pointing to the same object.
Memory location seems clearer to me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74935





More information about the llvm-commits mailing list