[PATCH] D75808: [ValueTracking] isKnownNonZero, computeKnownBits for freeze
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 14:13:54 PDT 2020
nikic accepted this revision.
nikic added a comment.
LGTM. This does seem useful as at least assumes and dominating conditions always imply non-poison.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1876
+ case Instruction::Freeze:
+ if (isGuaranteedNotToBePoison(I->getOperand(0), Q.CxtI, Q.DT, Depth))
+ computeKnownBits(I->getOperand(0), Known, Depth + 1, Q);
----------------
Should be `Depth + 1` here?
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2586
+ else if (const FreezeInst *FI = dyn_cast<FreezeInst>(V)) {
+ auto Op = FI->getOperand(0);
+ if (isKnownNonZero(Op, Depth, Q) &&
----------------
Please fix this tidy warning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75808/new/
https://reviews.llvm.org/D75808
More information about the llvm-commits
mailing list