[PATCH] D113784: [AMDGPU][GlobalISel] Rematerialize consts when repairing regbank
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 17 13:16:13 PST 2021
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp:166
+ MachineInstr *SrcMI = MRI->getUniqueVRegDef(Src);
+ if (SrcMI && SrcMI->getOpcode() == TargetOpcode::G_CONSTANT &&
+ MRI->hasOneNonDBGUse(SrcMI->getOperand(0).getReg())) {
----------------
the same applies for G_FCONSTANT and G_IMPLICIT_DEF, but I'm not sure this should be unconditionally done for all targets, and in all situations. For instance on AMDGPU we may want to choose a code size tradeoff with non-inlineable constants
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113784/new/
https://reviews.llvm.org/D113784
More information about the llvm-commits
mailing list