[PATCH] D47088: Fix aliasing of launder.invariant.group

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 15:14:06 PDT 2018


kuhar added inline comments.


================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:135
 static bool isEscapeSource(const Value *V) {
-  if (auto CS = ImmutableCallSite(V)) {
-    // launder_invariant_group captures its argument only by returning it,
-    // so it might not be considered an escape by isNonEscapingLocalObject.
-    // Note that adding similar special cases for intrinsics in CaptureTracking
-    // requires handling them here too.
-    if (CS.getIntrinsicID() == Intrinsic::launder_invariant_group)
-      return false;
-
+  if (ImmutableCallSite(V))
     return true;
----------------
Why was the previous change reverted here?


================
Comment at: llvm/test/Transforms/Inline/launder.invariant.group.ll:5
+; This test checks if value returned from the launder is considered aliasing
+; with it's argument.  Due to bug caused by handling launder in capture tracking
+; sometimes it would be considered noalias.
----------------
nit: its


Repository:
  rL LLVM

https://reviews.llvm.org/D47088





More information about the llvm-commits mailing list