[PATCH] D69477: [InstCombine] keep assumption before sinking calls

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 20:11:43 PDT 2019


jdoerfert added a comment.

This looks much better, thx. I have one more comment below, otherwise it is fine with me to go in. @xbolva00 comments, objections?



================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3159
+      if (CS->paramHasAttr(Idx, Attribute::NonNull) ||
+          (!llvm::NullPointerIsDefined(CS->getParent()->getParent()) &&
+           CS->paramHasAttr(Idx, Attribute::Dereferenceable))) {
----------------
xbolva00 wrote:
> CS-->getFunction()
We talk about a particular pointer that might have an address space so we need sth like:
`!llvm::NullPointerIsDefined(CS->getParent()->getParent(), CS->getArgOp(Idx)->getType()->getPointerAddressSpace()) `


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

https://reviews.llvm.org/D69477





More information about the llvm-commits mailing list