[llvm] [AArch64] Adjust costs for masked CompressStore and ExpandLoad (PR #226950)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 04:14:50 PDT 2026
================
@@ -5563,7 +5563,13 @@ AArch64TTIImpl::getMaskedMemoryOpCost(const MemIntrinsicCostAttributes &MICA,
return InstructionCost::getInvalid();
// Operation will be split into expand of masked.load
- MemOpCost *= 2;
+ // Something like:
+ // cntp x8, p0, p0.s
+ // whilelo p1.s, xzr, x8
+ // ld1w { z1.s }, p1/z, [x0]
+ // expand z1.s, p0, z1.s
+ // mov z0.s, p0/m, z1.s1
+ MemOpCost *= 4;
----------------
MacDue wrote:
Should the cost of the extra instructions be added to the MemOpCost (rather than multiply it)? The multiplication is a little fishy, since there is still only one memory operation.
https://github.com/llvm/llvm-project/pull/226950
More information about the llvm-commits
mailing list