mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-01 07:11:45 +00:00
Fix a major bug in operand latency computation. The use index must be adjusted
by the number of defs first for it to match the instruction itinerary. llvm-svn: 117518
This commit is contained in:
parent
b78530f9b0
commit
a07cd58978
@ -454,6 +454,9 @@ void ScheduleDAGSDNodes::ComputeOperandLatency(SDNode *Def, SDNode *Use,
|
||||
return;
|
||||
|
||||
unsigned DefIdx = Use->getOperand(OpIdx).getResNo();
|
||||
if (Use->isMachineOpcode())
|
||||
// Adjust the use operand index by num of defs.
|
||||
OpIdx += TII->get(Use->getMachineOpcode()).getNumDefs();
|
||||
int Latency = TII->getOperandLatency(InstrItins, Def, DefIdx, Use, OpIdx);
|
||||
if (Latency >= 0)
|
||||
dep.setLatency(Latency);
|
||||
|
Loading…
x
Reference in New Issue
Block a user