mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Check the VN of the src register at the two copies, not just the
register number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
839656120b
commit
a9badd250c
@ -1203,7 +1203,6 @@ static bool RegistersDefinedFromSameValue(LiveIntervals &li,
|
||||
VNInfo *VNI,
|
||||
LiveRange *LR,
|
||||
SmallVector<MachineInstr*, 8> &DupCopies) {
|
||||
return false; // To see if this fixes the i386 dragonegg buildbot miscompile.
|
||||
// FIXME: This is very conservative. For example, we don't handle
|
||||
// physical registers.
|
||||
|
||||
@ -1252,6 +1251,12 @@ static bool RegistersDefinedFromSameValue(LiveIntervals &li,
|
||||
if (Src != OtherSrc)
|
||||
return false;
|
||||
|
||||
// If the copies use two different value numbers of X, we cannot merge
|
||||
// A and B.
|
||||
if (SrcInt.FindLiveRangeContaining(Other->def)->valno !=
|
||||
SrcInt.FindLiveRangeContaining(VNI->def)->valno)
|
||||
return false;
|
||||
|
||||
DupCopies.push_back(MI);
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user