[PATCH] D50497: [AliasSetTracker] Do not treat experimental_guard intrinsic as memory writing instruction

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 14:23:03 PDT 2018


reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Analysis/AliasSetTracker.cpp:446
     case Intrinsic::sideeffect:
+    case Intrinsic::experimental_guard:
       return;
----------------
This is incorrect.  Guards don't write, but they do read everything.  As such, they must participate in the aliasing with the Ref state.

counter example:
for (int i = 0; i < N; i++)
  guard(LIC);
  store x = 5;
}

The store and guard must in the same alias set.


https://reviews.llvm.org/D50497





More information about the llvm-commits mailing list