llvm-project
12e78408 - [AMDGPU] Fix VOPD assembler validation for GFX12+ (#198034)

Commit
85 days ago
[AMDGPU] Fix VOPD assembler validation for GFX12+ (#198034) The related `codegen` side of this change was already landed by https://github.com/llvm/llvm-project/commit/c510ee553e2057f94c2f023c72abb3c9afec0962 ("[AMDGPU] VOPD: AllowSameVGPR on GFX12"), which changed `GCNVOPDUtils.cpp` to use `hasGFX12Insts()` instead of `hasGFX1250Insts()`. However, the assembler validation in `AMDGPUAsmParser.cpp` was not updated to match, causing it to reject valid VOPD instruction pairs that share the same VGPR as src0 on `gfx1200`. This fix aligns the assembler with the `codegen` by changing `isGFX1250Plus()` to `isGFX12Plus()` in `checkVOPDRegBankConstraints`, and adds a positive test case to verify same-VGPR src0 pairs assemble correctly on `gfx12`.
Author
Parents
Loading