mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-30 20:34:21 +00:00
Fix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machine operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b188dd9c5b
commit
014264b70f
@ -832,8 +832,10 @@ namespace {
|
||||
}
|
||||
Spills.ClobberPhysReg(NewPhysReg);
|
||||
Spills.ClobberPhysReg(NewOp.PhysRegReused);
|
||||
|
||||
MI->getOperand(NewOp.Operand).setReg(NewPhysReg);
|
||||
|
||||
unsigned SubIdx = MI->getOperand(NewOp.Operand).getSubReg();
|
||||
unsigned RReg = SubIdx ? TRI->getSubReg(NewPhysReg, SubIdx) : NewPhysReg;
|
||||
MI->getOperand(NewOp.Operand).setReg(RReg);
|
||||
|
||||
Spills.addAvailable(NewOp.StackSlotOrReMat, MI, NewPhysReg);
|
||||
--MII;
|
||||
|
Loading…
x
Reference in New Issue
Block a user