[PATCH] D109682: [LoopBoundSplit] Check the condition of the first iteration in pre-loop using isLoopEntryGuardedByCond
JinGu Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 21 07:41:31 PDT 2021
jaykang10 added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp:65
// Locate AddRec in LHSSCEV and Bound in RHSSCEV.
- if (isa<SCEVAddRecExpr>(Cond.BoundSCEV) &&
- !isa<SCEVAddRecExpr>(Cond.AddRecSCEV)) {
+ if (isa<SCEVAddRecExpr>(BoundSCEV) && !isa<SCEVAddRecExpr>(AddRecSCEV)) {
std::swap(Cond.AddRecValue, Cond.BoundValue);
----------------
mkazantsev wrote:
> `!isa<SCEVAddRecExpr>(AddRecSCEV)` is impossible
Ah, let me update it with `dyn_cast`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109682/new/
https://reviews.llvm.org/D109682
More information about the llvm-commits
mailing list