[llvm-branch-commits] [llvm] [Dexter] Enable after_hit_count for state nodes (PR #203846)
Orlando Cazalet-Hyams via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 30 04:15:45 PDT 2026
================
@@ -0,0 +1,31 @@
+// RUN: %dexter_regression_test_cxx_build %s -o %t
+// RUN: %dexter_regression_test_run --use-script --skip-evaluate --binary %t \
+// RUN: -- %s | FileCheck %s
+
+/// Test !then finish with !and{after_hit_count}.
+/// The infinite loop will be exited when we hit the `!then finish` command,
+/// which we will see after 101 hits of main: 50 hits on the loop line before
+/// after_hit_count is reached, 50 hits from stepping off of the loop line, and
+/// 1 hit from the step where we trigger the !then node.
+
+// CHECK-LABEL: Step 0
+// CHECK-COUNT-101: main
+// CHECK-NOT: Step
+
+bool checkCows() { return false; }
+
+int main() {
+ bool AreCowsHomeYet = false;
+ while (!AreCowsHomeYet) {
+ AreCowsHomeYet = checkCows(); // !dex_label loop
+ }
----------------
OCHyams wrote:
Probs better to avoid infinite-loop-on-failure tests. Can you do it without that instead even if it adds a little more checking complexity? (can we dump the total step count or something)
https://github.com/llvm/llvm-project/pull/203846
More information about the llvm-branch-commits
mailing list