mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 20:34:38 +00:00
Fix a potential bug that can cause miscomparison with and without debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114220 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
38cb1cdfb7
commit
f437f73348
@ -101,7 +101,7 @@ bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI,
|
|||||||
unsigned Reg = MO.getReg();
|
unsigned Reg = MO.getReg();
|
||||||
if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg))
|
if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg))
|
||||||
continue;
|
continue;
|
||||||
if (!MRI->hasOneUse(Reg))
|
if (!MRI->hasOneNonDBGUse(Reg))
|
||||||
// Only coalesce single use copies. This ensure the copy will be
|
// Only coalesce single use copies. This ensure the copy will be
|
||||||
// deleted.
|
// deleted.
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user