forked from OSchip/llvm-project
Register re-use for scavenged frame indices must check for re-deginition
of the register in the instruction which kills the scavenged value. llvm-svn: 84641
This commit is contained in:
parent
4a43e3068d
commit
5f2581a37a
|
@ -873,6 +873,10 @@ void PEI::scavengeFrameVirtualRegs(MachineFunction &Fn) {
|
|||
PrevLastUseOp = i;
|
||||
CurrentScratchReg = CurrentVirtReg = 0;
|
||||
havePrevValue = trackingCurrentValue;
|
||||
// Re-scan the operands of this instruction to catch definitions
|
||||
// of the scratch register we're using. This is to handle things
|
||||
// like ldr "r2, [scratch]" where scratch is r2.
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
RS->forward(MI);
|
||||
|
|
Loading…
Reference in New Issue