[llvm] AMDGPU: Fix assembler asserting on expressions in vop3 instructions (PR #100103)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 05:56:16 PDT 2024
================
@@ -8649,7 +8649,7 @@ void AMDGPUAsmParser::cvtVOP3(MCInst &Inst, const OperandVector &Operands,
Op.addRegOrImmWithFPInputModsOperands(Inst, 2);
} else if (Op.isImmModifier()) {
OptionalIdx[Op.getImmTy()] = I;
- } else if (Op.isRegOrImm()) {
+ } else if (Op.isRegOrImm() || Op.isExpr()) {
Op.addRegOrImmOperands(Inst, 1);
} else {
llvm_unreachable("unhandled operand type");
----------------
jayfoad wrote:
Maybe don't bother checking the type here, just leave it to assert inside `addRegOrImmOperands`?
```suggestion
} else {
Op.addRegOrImmOperands(Inst, 1);
```
https://github.com/llvm/llvm-project/pull/100103
More information about the llvm-commits
mailing list