mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
ScheduleDAGInstrs: Fix memory corruption
We have to modify V2SU before inserting new elements into the CurrentVRegDefs set because that may move V2SU in memory invalidating the reference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4811e71d7
commit
20c7e33686
@ -511,10 +511,10 @@ void ScheduleDAGInstrs::addVRegDefDeps(SUnit *SU, unsigned OperIdx) {
|
||||
// VReg2SUnit for the non-overlapping part.
|
||||
LaneBitmask OverlapMask = V2SU.LaneMask & LaneMask;
|
||||
LaneBitmask NonOverlapMask = V2SU.LaneMask & ~LaneMask;
|
||||
if (NonOverlapMask != 0)
|
||||
CurrentVRegDefs.insert(VReg2SUnit(Reg, NonOverlapMask, V2SU.SU));
|
||||
V2SU.SU = SU;
|
||||
V2SU.LaneMask = OverlapMask;
|
||||
if (NonOverlapMask != 0)
|
||||
CurrentVRegDefs.insert(VReg2SUnit(Reg, NonOverlapMask, DefSU));
|
||||
}
|
||||
// If there was no CurrentVRegDefs entry for some lanes yet, create one.
|
||||
if (LaneMask != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user