mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +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)
|
if (!MO)
|
||||||
MO = &MI->getOperand(OpIdx);
|
MO = &MI->getOperand(OpIdx);
|
||||||
|
|
||||||
if (usesConstantBus(MRI, *MO)) {
|
if (isVALU(InstDesc.Opcode) && usesConstantBus(MRI, *MO)) {
|
||||||
unsigned SGPRUsed =
|
unsigned SGPRUsed =
|
||||||
MO->isReg() ? MO->getReg() : (unsigned)AMDGPU::NoRegister;
|
MO->isReg() ? MO->getReg() : (unsigned)AMDGPU::NoRegister;
|
||||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user