Skip to content

Commit dff332f

Browse files
Martien de Jongmartien-de-jong
authored andcommitted
[AIE] Check empty interval early
1 parent d834bd3 commit dff332f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Target/AIE/AIEPostPipeliner.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,12 @@ bool PostPipeliner::scheduleFirstIteration(PostPipelinerStrategy &Strategy) {
664664
MachineInstr *MI = SU.getInstr();
665665
const int Earliest = Strategy.earliest(SU);
666666
const int Latest = Strategy.latest(SU);
667-
// Find the first cycle that fits. We try every position modulo II
667+
if (Earliest > Latest) {
668+
LLVM_DEBUG(dbgs() << "Latency violation at node " << N << " interval=["
669+
<< Earliest << ", " << Latest << "]\n");
670+
return false;
671+
}
672+
668673
const int Actual = Strategy.fromTop() ? fit(MI, Earliest, Latest + 1, II)
669674
: fit(MI, Latest, Earliest - 1, II);
670675
if (Actual < 0) {

0 commit comments

Comments
 (0)