[llvm] [AMDGPU] SIInsertWaitcnts: rebase async marks into the merged frame at CFG joins (PR #211688)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 01:20:00 PDT 2026
================
@@ -0,0 +1,182 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6
+# RUN: llc -mtriple=amdgpu9.50-amd-amdhsa -run-pass=si-insert-waitcnts -o - %s | FileCheck %s
+
+# Regression test for WaitcntBrackets::mergeAsyncMarks rebasing surviving async
+# marks into the merged (widened) counter frame at a CFG join.
+#
+# The join (bb.3) has two predecessors:
+# - an async-mark predecessor: one async LDS DMA + ASYNCMARK, so one async mark
+# recorded at LOAD_CNT score 1 (small frame, UB = 1).
+# - a load predecessor: several async LDS DMAs with no ASYNCMARK. These stay
+# outstanding (they write LDS, no VGPR result) and extend the frame to UB = 4,
+# but contribute no async marks.
+#
+# si-insert-waitcnts visits the branch target (bb.2) before the fall-through
----------------
Pierre-vh wrote:
You could simplify the explanation a bit to just show what the expected result is. The bug history is in the git blame if anyone needs it
Otherwise if I am updating the test it's a bit hard to see at a glance what behavior needs to be preserved
https://github.com/llvm/llvm-project/pull/211688
More information about the llvm-commits
mailing list