[llvm] [AMDGPU] Fix LSR cost comparator that regressed GFX9+ occupancy (PR #204344)
Yuyang Zhang via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 19:24:05 PDT 2026
================
@@ -1858,21 +1858,20 @@ InstructionCost GCNTTIImpl::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
bool GCNTTIImpl::isLSRCostLess(const TTI::LSRCost &A,
const TTI::LSRCost &B) const {
- // Favor lower per-iteration work over preheader/setup costs.
- // AMDGPU lacks rich addressing modes, so ScaleCost is folded into the
- // effective instruction count (base+scale*index requires a separate ADD).
+ // GFX9+ occupancy is VGPR-bound, so register pressure must dominate the LSR
----------------
yuyzhang512 wrote:
Done.
https://github.com/llvm/llvm-project/pull/204344
More information about the llvm-commits
mailing list