mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-25 00:35:30 +00:00
Allow non zero_reg explicit values for OptionalDefOperands in aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138073 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
73a1c2cea1
commit
c68e927488
@ -424,6 +424,13 @@ bool CodeGenInstAlias::tryAliasOpMatch(DagInit *Result, unsigned AliasOpNo,
|
||||
|
||||
// Handle explicit registers.
|
||||
if (ADI && ADI->getDef()->isSubClassOf("Register")) {
|
||||
if (InstOpRec->isSubClassOf("OptionalDefOperand")) {
|
||||
DagInit *DI = InstOpRec->getValueAsDag("MIOperandInfo");
|
||||
// The operand info should only have a single (register) entry. We
|
||||
// want the register class of it.
|
||||
InstOpRec = dynamic_cast<DefInit*>(DI->getArg(0))->getDef();
|
||||
}
|
||||
|
||||
if (InstOpRec->isSubClassOf("RegisterOperand"))
|
||||
InstOpRec = InstOpRec->getValueAsDef("RegClass");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user