[PATCH] D95521: [SCEV] Apply loop guards to trailing zero bits
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 31 10:54:05 PST 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:13277
+ auto ClearLowBits = getMulExpr(
+ getUDivExpr(LHSUnknown, Divisor), Divisor,
+ (SCEV::NoWrapFlags)(SCEV::FlagNUW | SCEV::FlagNSW));
----------------
gilr wrote:
> fhahn wrote:
> > Here we could just re-use the existing `URem` expression?
> Do you mean by computing `(A / B) * B` from the URem expression e.g. via `A - URemExpr`?
Nevermind, I was thinking about something else and we probably need the div & multiply to make sure the SCEV logic can determine the right multiple.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95521/new/
https://reviews.llvm.org/D95521
More information about the llvm-commits
mailing list