[PATCH] D97219: [LSR] Unify scheduling of existing and inserted addrecs
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 28 21:50:42 PST 2021
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5574
+ // First, filter out anything not an obvious addrec
+ if (!SE.isSCEVable(PN.getType()) || !isa<SCEVAddRecExpr>(SE.getSCEV(&PN)))
+ continue;
----------------
Because of simplifications, `isa<SCEVAddRecExpr>(SE.getSCEV(&PN))` is potentially more expensive than everything you are going to make here. If it's not a legality check, I think it should be removed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97219/new/
https://reviews.llvm.org/D97219
More information about the llvm-commits
mailing list