[PATCH] D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 08:27:26 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:3412-3414
+Register AMDGPUInstructionSelector::copyToVGPR(Register Src, unsigned Mods,
+ MachineOperand Root,
+ bool ForceVGPR) const {
----------------
The name isn't accurate since this isn't just blindly inserting a copy. How about copyToVGPRIfSrcFolded
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:3415
+ bool ForceVGPR) const {
if ((Mods != 0 || ForceVGPR) &&
RBI.getRegBank(Src, *MRI, TRI)->getID() != AMDGPU::VGPRRegBankID) {
----------------
Unrelated, but I don't understand why this modifier check is here. It doesn't factor into the constant bus restriction
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:3647
+ /* OpSel */ true);
+ Src = copyToVGPR(Src, Mods, Root, /* ForceVGPR */ true);
----------------
Could you put this down in the callback with the addReg (same with the rest)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138044/new/
https://reviews.llvm.org/D138044
More information about the llvm-commits
mailing list