[PATCH] D88207: [ValueTracking] Check uses of Argument if it is given to isGuaranteedNotToBeUndefOrPoison
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 12:07:30 PDT 2020
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4889
+ if (programUndefinedIfUndefOrPoison(A, PoisonOnly))
+ return true;
}
----------------
aqjune wrote:
> nikic wrote:
> > I would prefer to move the programUndefinedIfUndefOrPoison() call below outside the Instruction check, and just return false from programUndefinedIfUndefOrPoison() on non-Instruction/Argument (aka Constant).
> Would it make `programUndefinedIfUndefOrPoison()` differentiate non-undef and undef constants?
> We'll want to make `programUndefinedIfUndefOrPoison(undef)` return false.
I don't think it's useful to make a distinction, we can just return false for all constants.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88207/new/
https://reviews.llvm.org/D88207
More information about the llvm-commits
mailing list