mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +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
@ -833,7 +833,9 @@ 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…
Reference in New Issue
Block a user