[llvm] [AMDGPU][AsmParser] Allow `v_writelane_b32` to use SGPR and M0 as source operands at the same time (PR #78827)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 18:36:49 PST 2024
================
@@ -3524,6 +3524,34 @@ bool AMDGPUAsmParser::validateConstantBusLimitations(
!isVOPD(Opcode))
return true;
+ // Based on the comment for `AMDGPUInstructionSelector::selectWritelane`:
+ // Writelane is special in that it can use SGPR and M0 (which would normally
+ // count as using the constant bus twice - but in this case it is allowed
+ // since the lane selector doesn't count as a use of the constant bus).
+ // However, it is still required to abide by the 1 SGPR rule.
+ switch (Opcode) {
+ default:
+ break;
+ case V_WRITELANE_B32_e64_gfx11:
----------------
shiltian wrote:
Is there any way that we don't have to list all variants here?
https://github.com/llvm/llvm-project/pull/78827
More information about the llvm-commits
mailing list