[llvm] [LSR] Recognize vscale-relative immediates (PR #88124)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 08:42:47 PDT 2024
================
@@ -1308,9 +1390,9 @@ void Cost::RateRegister(const Formula &F, const SCEV *Reg,
// If the step size matches the base offset, we could use pre-indexed
// addressing.
- if (AMK == TTI::AMK_PreIndexed) {
+ if (AMK == TTI::AMK_PreIndexed && !F.BaseOffset.isScalable()) {
----------------
huntergr-arm wrote:
There's no 'isFixed()' method on FixedOrScalableQuantity, so I just used the inverse of isScalable(). They're logically equivalent, though there's semantic reinforcement from separating them.
But I do wonder if we want an uninitialized state for scalable-ness, and allow that to be freely used with either fixed or scalable offsets. The result would then be 'locked in' to one or the other.
https://github.com/llvm/llvm-project/pull/88124
More information about the llvm-commits
mailing list