[llvm] [TTI] Support scalable offsets in getScalingFactorCost (PR #88113)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 07:37:01 PDT 2024


================
@@ -6731,9 +6731,10 @@ InstructionCost X86TTIImpl::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
   // vmovaps %ymm1, (%r8) can use port 2, 3, or 7.
   TargetLoweringBase::AddrMode AM;
   AM.BaseGV = BaseGV;
-  AM.BaseOffs = BaseOffset;
+  AM.BaseOffs = BaseOffset.getFixed();
   AM.HasBaseReg = HasBaseReg;
   AM.Scale = Scale;
+  assert(!BaseOffset.getScalable() && "Scalable offsets unsupported");
----------------
paulwalker-arm wrote:

As above, this is the responsibility of the users of `AM`.

https://github.com/llvm/llvm-project/pull/88113


More information about the llvm-commits mailing list