[PATCH] D117482: AMDGPU: Don't clobber source register for V_SET_INACTIVE_*
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 23:48:10 PST 2022
critson added a comment.
If I understand correctly, the root issue is the Register Coalescer not being aware of the wave-level CFG?
It is unfortunate that we have to add these copies, but I agree this seems the simplest fix right now.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:1876
unsigned Exec = ST.isWave32() ? AMDGPU::EXEC_LO : AMDGPU::EXEC;
+ BuildMI(MBB, MI, DL, get(AMDGPU::V_MOV_B32_e32), MI.getOperand(0).getReg())
+ .add(MI.getOperand(1));
----------------
Perhaps we could add a comment above this e.g.
// We remove this COPY if/when optimizations (e.g. Register Coalescer) are made aware of the wave-level CFG.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:183
def V_SET_INACTIVE_B32 : VPseudoInstSI <(outs VGPR_32:$vdst),
- (ins VGPR_32: $src, VSrc_b32:$inactive),
+ (ins VSrc_b32: $src, VSrc_b32:$inactive),
[(set i32:$vdst, (int_amdgcn_set_inactive i32:$src, i32:$inactive))]> {
----------------
This is just tidy up?
================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:185
[(set i32:$vdst, (int_amdgcn_set_inactive i32:$src, i32:$inactive))]> {
- let Constraints = "$src = $vdst";
}
----------------
This removes the tie constraint, correct?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117482/new/
https://reviews.llvm.org/D117482
More information about the llvm-commits
mailing list