aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachinePipeliner.cpp
diff options
context:
space:
mode:
authorRyotaro Kasuga <kasuga.ryotaro@fujitsu.com>2025-07-22 09:53:13 +0900
committerGitHub <noreply@github.com>2025-07-22 09:53:13 +0900
commit6df012ab48ececd27359bdc9448ee101b39eea7a (patch)
tree9a0e0c182132becd2b5337e30f0b7af58daafac7 /llvm/lib/CodeGen/MachinePipeliner.cpp
parent24bf4aea0ca31c4733d8771751f7fb766c455aa9 (diff)
downloadllvm-6df012ab48ececd27359bdc9448ee101b39eea7a.zip
llvm-6df012ab48ececd27359bdc9448ee101b39eea7a.tar.gz
llvm-6df012ab48ececd27359bdc9448ee101b39eea7a.tar.bz2
[MachinePipeliner] Fix incorrect dependency direction (#149436)
This patch fixes a bug introduced in #145878. A dependency was added in the wrong direction, causing an assertion failure due to broken topological order.
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachinePipeliner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index b38a4d1c..90005bd 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -4279,8 +4279,8 @@ void LoopCarriedEdges::modifySUnits(std::vector<SUnit> &SUnits,
!TII->isGlobalMemoryObject(FromMI) &&
!TII->isGlobalMemoryObject(ToMI) && !isSuccOrder(From, To)) {
SDep Pred = Dep;
- Pred.setSUnit(Src);
- Dst->addPred(Pred);
+ Pred.setSUnit(From);
+ To->addPred(Pred);
}
}
}