[llvm] [AMDGPU][GlobalISel] Align `selectVOP3PMadMixModsImpl` with the `SelectionDAG` counterpart (PR #110168)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 00:56:18 PDT 2024
petar-avramovic wrote:
IMO, the easiest approach is to force vgpr reg class on all operands when selecting vop3p instructions. Do this with constrainOperandRegClass, to vgpr reg class you can get from getVGPRClassForBitWidth. This will insert copy from sgpr to vgpr for all operands.
SIFoldOperands can eliminate some of the copies by replacing vgpr with sgpr so you end up with same result in the end (SIFoldOperands knows about constant bus restriction).
https://github.com/llvm/llvm-project/pull/110168
More information about the llvm-commits
mailing list