mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Allow kill flags on two-address instructions. They are harmless.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128643 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e53aca51a
commit
02ae9f2f27
@ -610,13 +610,9 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
|
|||||||
if (MI->isRegTiedToDefOperand(MONum, &defIdx)) {
|
if (MI->isRegTiedToDefOperand(MONum, &defIdx)) {
|
||||||
// A two-addr use counts as a kill if use and def are the same.
|
// A two-addr use counts as a kill if use and def are the same.
|
||||||
unsigned DefReg = MI->getOperand(defIdx).getReg();
|
unsigned DefReg = MI->getOperand(defIdx).getReg();
|
||||||
if (Reg == DefReg) {
|
if (Reg == DefReg)
|
||||||
isKill = true;
|
isKill = true;
|
||||||
// And in that case an explicit kill flag is not allowed.
|
else if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
||||||
if (MO->isKill())
|
|
||||||
report("Illegal kill flag on two-address instruction operand",
|
|
||||||
MO, MONum);
|
|
||||||
} else if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
|
||||||
report("Two-address instruction operands must be identical",
|
report("Two-address instruction operands must be identical",
|
||||||
MO, MONum);
|
MO, MONum);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user