[PATCH] D89821: [SCEV] Match 'zext (trunc A to iB) to iY' as URem.
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 25 21:14:09 PDT 2020
mkazantsev accepted this revision.
mkazantsev added a comment.
This revision is now accepted and ready to land.
Looks good, thanks!
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:12698
+ // the operand A matches the size of the whole expressions.
+ if (const auto *ZExt = dyn_cast<SCEVZeroExtendExpr>(Expr)) {
+ const auto *Trunc = dyn_cast<SCEVTruncateExpr>(ZExt->getOperand(0));
----------------
`{}` not needed
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:12699
+ if (const auto *ZExt = dyn_cast<SCEVZeroExtendExpr>(Expr)) {
+ const auto *Trunc = dyn_cast<SCEVTruncateExpr>(ZExt->getOperand(0));
+ if (Trunc) {
----------------
`if (auto *Trunc = ...`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89821/new/
https://reviews.llvm.org/D89821
More information about the llvm-commits
mailing list