[llvm] [AMDGPU] Don't merge M0 initializations across calls that clobber M0 (PR #221963)
Pankaj Dwivedi via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 03:47:21 PDT 2026
================
@@ -458,6 +458,7 @@ getFirstNonPrologue(MachineBasicBlock *MBB, const TargetInstrInfo *TII) {
// SGPR. A VGPR cannot be processed since we cannot guarantee vector
// executioon.
static bool hoistAndMergeSGPRInits(unsigned Reg,
+ ArrayRef<MachineInstr *> RegMaskInstrs,
----------------
PankajDwivedi-25 wrote:
getUsedPhysRegsMask() isn't populated this early, it's only filled during RA and by the MIR parser, so at addInstSelector() it's empty; with just that check, ds_read_call_read still emits ds_read_b32 after the call with no m0 re-init(verified).
https://github.com/llvm/llvm-project/pull/221963
More information about the llvm-commits
mailing list