mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
Refine EarlyClobber assert in register scavenger.
It is legal for an inline asm operand to use an earlyclobber register if the use operand is tied to the earlyclobber operand. The issue is discussed here: http://gcc.gnu.org/ml/gcc/1999-04n/msg00431.html We should perhaps let only the machine code verifier worry about these finer details. EarlyClobber operands are not really interesting to the scavenger. This fixes PR4528 for the third time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -236,7 +236,7 @@ void RegScavenger::forward() {
|
||||
continue;
|
||||
if (MO.isUse()) {
|
||||
assert(isUsed(Reg) && "Using an undefined register!");
|
||||
assert(!EarlyClobberRegs.test(Reg) &&
|
||||
assert((!EarlyClobberRegs.test(Reg) || MI->isRegTiedToDefOperand(i)) &&
|
||||
"Using an early clobbered register!");
|
||||
} else {
|
||||
assert(MO.isDef());
|
||||
|
Reference in New Issue
Block a user