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

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 19 05:40:16 PDT 2018


xbolva00 added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3389
+const Value *llvm::getArgumentAliasingToReturnedPointer(ImmutableCallSite CS) {
+  assert(CS);
+  if (const Value *RV = CS.getReturnedArgOperand())
----------------
Prazek wrote:
> xbolva00 wrote:
> > Why assert here?
> It is possible that this funciton would return nullptr if passed null CS,
> but such function would be harder to reason about. In this case I assume that caller checked the the instruction is a CallSite, the same way as is done with different functions.
Can you add a info message into assert then? 
assert (CS && "...");



Repository:
  rL LLVM

https://reviews.llvm.org/D47088





More information about the llvm-commits mailing list