[llvm-branch-commits] [llvm] [Dexter] Add support for writing !step values (PR #203845)

Stephen Tozer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 30 06:48:33 PDT 2026


================
@@ -0,0 +1,31 @@
+/// NB: The exact contents of this file are compared against the corresponding
+///     "_expected" file in this directory; any changes to this file, including
+///     comments, will require updating the expected file.
+
+int main() {
+  int Go = 0;
+  int Times = 0;
+start:
+  Times += 1;
+  for (int I = 0; I < 3; ++I) {
+    if (I == 1)
+      Go += 1;
+    if (I > 1 && Go % 2)
+      goto start; // !dex_label first_goto
+  }
+  if (Times < 4)
+    goto start; // !dex_label second_goto
+  return 0;
+}
+
+/*
+---
+!where {function: main}:
+  ? !step exactly
+  # For test clarity: we step on the first goto 2 times, and the second once.
+  !and {lines: !label first_goto}:
+    !step exactly: [!label first_goto, !label first_goto]
----------------
SLTozer wrote:

Indeed we aren't saying "please fill out these steps for me" - these steps are actual expects, they were used to make the expected control flow clear and test it against the output, but since they're now causing more confusion than clarity I'll remove them.

https://github.com/llvm/llvm-project/pull/203845


More information about the llvm-branch-commits mailing list