This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Allow some modifiers on VOP3B instructions
ClosedPublic

Authored by foad on Oct 28 2020, 4:01 AM.

Details

Summary

V_DIV_SCALE_F32/F64 are VOP3B encoded so they can't use the ABS src
modifier, but they can still use NEG and the usual output modifiers.

This partially reverts 3b99f12a4e6f "AMDGPU: Remove modifiers from v_div_scale_*".

Diff Detail

Event Timeline

foad created this revision.Oct 28 2020, 4:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2020, 4:01 AM
foad requested review of this revision.Oct 28 2020, 4:01 AM
foad added inline comments.Oct 28 2020, 4:12 AM
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
3308

This is duplicating checks from SIInstrInfo::verifyInstruction. Is there a better way?

3312–3317

Is there a better way than listing all the real opcodes for all architectures?

arsenm added inline comments.Oct 28 2020, 6:45 AM
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
3312–3317

Probably not right now, other than burning a bit for IsDivScale which is probably not worth it.

foad added inline comments.Oct 28 2020, 6:56 AM
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
3312–3317

Could we get TableGen to emit a real-to-pseudo opcode mapping table, like it generates pseudo-to-real tables?

arsenm added inline comments.Oct 28 2020, 6:56 AM
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
3312–3317

I've been thinking of trying an alternative strategy where we emit entirely separate instruction tables per subtarget

rampitec accepted this revision.Oct 28 2020, 11:32 AM

LGTM. I also do not like lists of real instructions, but this is a pre-existing problem.

This revision is now accepted and ready to land.Oct 28 2020, 11:32 AM
This revision was landed with ongoing or failed builds.Oct 28 2020, 2:54 PM
This revision was automatically updated to reflect the committed changes.