[all-commits] [llvm/llvm-project] fb2786: [AMDGPU] SIFoldOperands: Delay foldCopyToVGPROfSca...
Fabian Ritter via All-commits
all-commits at lists.llvm.org
Tue May 27 02:31:13 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fb27867bd5a04975516b099681587ea32f38f3d4
https://github.com/llvm/llvm-project/commit/fb27867bd5a04975516b099681587ea32f38f3d4
Author: Fabian Ritter <fabian.ritter at amd.com>
Date: 2025-05-27 (Tue, 27 May 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
M llvm/test/CodeGen/AMDGPU/flat-scratch-svs.ll
Log Message:
-----------
[AMDGPU] SIFoldOperands: Delay foldCopyToVGPROfScalarAddOfFrameIndex (#141558)
foldCopyToVGPROfScalarAddOfFrameIndex transforms s_adds whose results are copied
to vector registers into v_adds. We don't want to do that if foldInstOperand
(which so far runs later) can fold the sreg->vreg copy away.
This patch therefore delays foldCopyToVGPROfScalarAddOfFrameIndex until after
foldInstOperand.
This avoids unnecessary movs in the flat-scratch-svs.ll test and also avoids
regressions in an upcoming patch to enable ISD::PTRADD nodes.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list