[llvm] [SPIR-V] Fix sub-byte argument type mismatch in call lowering (PR #189893)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 05:09:15 PDT 2026
================
@@ -395,7 +395,6 @@ bool SPIRVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
assert(VRegs[i].size() == 1 && "Formal arg has multiple vregs");
Register ArgReg = VRegs[i][0];
MRI->setRegClass(ArgReg, GR->getRegClass(ArgTypeVRegs[i]));
- MRI->setType(ArgReg, GR->getRegType(ArgTypeVRegs[i]));
----------------
MrSidims wrote:
So, the idea basically is: the SPIR-V type is tracked separately via assignSPIRVTypeToVReg, and the GMIR-level LLT should remain as the IRTranslator set it. The SPIRVPreLegalizer will later uniformly widen all sub-byte LLTs consistently across both defs and uses. Is it correct?
https://github.com/llvm/llvm-project/pull/189893
More information about the llvm-commits
mailing list