[PATCH] D158776: [ConstraintElim] Handle trivial (ICMP_ULE, 0, B) in doesHold.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 29 08:08:07 PDT 2023
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:741
+ if (Pred == CmpInst::ICMP_ULE && A == Constant::getNullValue(A->getType()))
+ return true;
auto R = getConstraintForSolving(Pred, A, B);
----------------
nikic wrote:
> Is it guaranteed that zero will be on the left?
For the preconditions, yes, but in general no. I extended the logic to also handle `UGE B, 0`. This simplifies a bunch of checks in the tests, but won't change much with the current pipeline position.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158776/new/
https://reviews.llvm.org/D158776
More information about the llvm-commits
mailing list