mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
R600/SI: isLegalOperand() shouldn't check constant bus for SALU instructions
The constant bus restrictions only apply to VALU instructions. This enables SIFoldOperands to fold immediates into SALU instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224623 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
87bd2fa24b
commit
2516f059db
@ -1405,7 +1405,7 @@ bool SIInstrInfo::isOperandLegal(const MachineInstr *MI, unsigned OpIdx,
|
||||
if (!MO)
|
||||
MO = &MI->getOperand(OpIdx);
|
||||
|
||||
if (usesConstantBus(MRI, *MO)) {
|
||||
if (isVALU(InstDesc.Opcode) && usesConstantBus(MRI, *MO)) {
|
||||
unsigned SGPRUsed =
|
||||
MO->isReg() ? MO->getReg() : (unsigned)AMDGPU::NoRegister;
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user