mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Don't sink the instruction if TargetRegisterInfo::isSafeToMoveRegClassDefs doesn't think it's safe. This works around PR1911.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0469280776
commit
b6f5417edb
@ -167,6 +167,10 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) {
|
||||
} else {
|
||||
// Virtual register uses are always safe to sink.
|
||||
if (MO.isUse()) continue;
|
||||
|
||||
// If it's not safe to move defs of the register class, then abort.
|
||||
if (!TII->isSafeToMoveRegClassDefs(RegInfo->getRegClass(Reg)))
|
||||
return false;
|
||||
|
||||
// FIXME: This picks a successor to sink into based on having one
|
||||
// successor that dominates all the uses. However, there are cases where
|
||||
|
Loading…
x
Reference in New Issue
Block a user