[llvm] [AMDGPU] Handle `s_setreg_imm32_b32` targeting `MODE` register (PR #174681)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 9 11:11:25 PST 2026
================
@@ -160,12 +176,19 @@ bool AMDGPULowerVGPREncoding::setMode(ModeTy NewMode, ModeTy Mask,
CurrentMode |= NewMode;
CurrentMask |= Mask;
- MachineOperand &Op = MostRecentModeSet->getOperand(0);
-
- // Carry old mode bits from the existing instruction.
- int64_t OldModeBits = Op.getImm() & (ModeMask << ModeWidth);
+ // Update MostRecentModeSet with the new mode. It can be either
+ // S_SET_VGPR_MSB or S_SETREG_IMM32_B32 (with Size <= 12).
----------------
shiltian wrote:
Yes, that's the core idea.
https://github.com/llvm/llvm-project/pull/174681
More information about the llvm-commits
mailing list