[PATCH] D89219: [ValueTracking] Use assume's noundef operand bundle
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 04:16:02 PDT 2020
aqjune marked 2 inline comments as done.
aqjune added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4843
+}
+
static bool isGuaranteedNotToBeUndefOrPoison(const Value *V,
----------------
Tyker wrote:
> jdoerfert wrote:
> > I thought we had a helper for this, I think it is `hasAttributeInAssume` in `llvm/include/llvm/Analysis/AssumeBundleQueries.h`. If that is not enough we should extend it for sure. This kind of query is common and easy to get wrong. For example, this doesn't handle multiple `noundef` bundles.
> there is getKnowledgeValidInContext which should be enough for what is being done here. it also has a fallback when there is no AssumptionCache.
> also getOperandBundle is not valid since there maybe more than one noundef bundle in this assume.
Thanks for the infos!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89219/new/
https://reviews.llvm.org/D89219
More information about the llvm-commits
mailing list