Skip to content

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Oct 3, 2025

This is trying to constrain the register class of a physical register,
which makes no sense.

arsenm added 2 commits October 3, 2025 15:27
This constrainRegClass check would never pass for a physical
register.
This is trying to constrain the register class of a physical register,
which makes no sense.
@llvmbot
Copy link
Member

llvmbot commented Oct 3, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

This is trying to constrain the register class of a physical register,
which makes no sense.


Full diff: https://github.com/llvm/llvm-project/pull/161792.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SIInstrInfo.cpp (-2)
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index fe6b8b96cbd57..cda8069936af2 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -2112,8 +2112,6 @@ bool SIInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
 
   case AMDGPU::SI_RESTORE_S32_FROM_VGPR:
     MI.setDesc(get(AMDGPU::V_READLANE_B32));
-    MI.getMF()->getRegInfo().constrainRegClass(MI.getOperand(0).getReg(),
-                                               &AMDGPU::SReg_32_XM0RegClass);
     break;
   case AMDGPU::AV_MOV_B32_IMM_PSEUDO: {
     Register Dst = MI.getOperand(0).getReg();

Base automatically changed from users/arsenm/amdgpu/remove-dead-code-constrain-physreg-moveToVALU to main October 3, 2025 12:19
@arsenm arsenm merged commit 5601c40 into main Oct 3, 2025
13 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu/stop-constraining-physregs-expand-pseudo branch October 3, 2025 12:19
MixedMatched pushed a commit to MixedMatched/llvm-project that referenced this pull request Oct 3, 2025
…lvm#161792)

This is trying to constrain the register class of a physical register,
which makes no sense.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants