[llvm] [AMDGPU][GlobalISel] Guard against use of disallowed sub-registers (PR #188781)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 03:59:03 PDT 2026


================
@@ -5163,6 +5163,19 @@ static bool isSubRegOf(const SIRegisterInfo &TRI,
          SubReg.getReg() == SuperVec.getReg();
 }
 
+/// Check if given MachineOperand is an SGPR with SubReg hi16.
----------------
arsenm wrote:

This shouldn't require manual verification. This should be implied by the register class and subregister definitions 

https://github.com/llvm/llvm-project/pull/188781


More information about the llvm-commits mailing list