[AMDGPU] Allow multiple uses of the same literal
authorJay Foad <jay.foad@amd.com>
Thu, 8 Apr 2021 11:58:49 +0000 (12:58 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 20 Apr 2021 15:44:01 +0000 (16:44 +0100)
commitec8c61efdf9537c16f7f70a1cf6e8018b1d9c664
tree3f47553136e23153342f33b459be372ff7e62c65
parenta0573b6c10030357d31f30a19df1b3134b698f94
[AMDGPU] Allow multiple uses of the same literal

In GFX10 VOP3 can have a literal, which opens up the possibility of two
operands using the same literal value, which is allowed and only counts
as one use of the constant bus.

AMDGPUAsmParser::validateConstantBusLimitations already knew about this
but SIInstrInfo::verifyInstruction did not.

Differential Revision: https://reviews.llvm.org/D100770
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/verify-duplicate-literal.mir [new file with mode: 0644]