Closed
Description
We found that the SchedStart
may not be considered when scheduling instructions.
Please refer to the following link for details.
https://godbolt.org/z/G16Kd7Y6P
The following is part of the debugging output.
Inst (11) %77:fpr128 = LDRQui %10:gpr64sp, 0, debug-location !41 :: (load (s128) from %ir.lsr.iv63, align 4, !tbaa !36); example.c:10:24
es: ffffffe8 ls: ffffffe9 me: 7fffffff ms: ffffffe9
Trying to insert node between -24 and -23 II: 47
insert at cycle -24 %77:fpr128 = LDRQui %10:gpr64sp, 0, debug-location !41 :: (load (s128) from %ir.lsr.iv63, align 4, !tbaa !36); example.c:10:24
In this case, SchedStart
is -23, so we must insert this instruction at cycle -23, however it's inserted at -24.
Perhaps following part causes this problem.
llvm-project/llvm/lib/CodeGen/MachinePipeliner.cpp
Lines 2441 to 2449 in e1cc9e4
By the way, is there any reason why SchedStart
and EarlyStart
are treated separately (same for SchedEnd
and LateStart
) ?
If not, I think merging them makes code simpler.