[PATCH] D100564: [TTI] NFC: Change getScalingFactorCost to return InstructionCost
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 22 05:49:34 PDT 2021
sdesmalen marked an inline comment as done.
sdesmalen added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1782-1783
assert(ScaleCostMinOffset >= 0 && ScaleCostMaxOffset >= 0 &&
+ ScaleCostMinOffset.isValid() && ScaleCostMaxOffset.isValid() &&
"Legal addressing mode has an illegal cost!");
----------------
paulwalker-arm wrote:
> I can see that `TargetTransformInfo::getScalingFactorCost` already performs the `>=0` test and so I'm wondering if at this point you only need to assert the costs are valid?
You're right, those checks seem redundant. I'll remove them before submitting the patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100564/new/
https://reviews.llvm.org/D100564
More information about the llvm-commits
mailing list