[llvm] [UTC][VPlan] Use `-vplan-print-after` for VPlan-dump-based tests (PR #178736)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 08:54:03 PST 2026


https://github.com/eas updated https://github.com/llvm/llvm-project/pull/178736

>From 3cc13ab6ee4ab5397d343d4b69c0ce74e8d11e60 Mon Sep 17 00:00:00 2001
From: Andrei Elovikov <andrei.elovikov at sifive.com>
Date: Tue, 27 Jan 2026 16:59:55 -0800
Subject: [PATCH 1/2] [VPlan] Print function name in `-vplan-print-after*`

---
 .../Transforms/Vectorize/VPlanTransforms.h    |  6 +-
 .../LoopVectorize/vplan-print-after-all.ll    | 78 +++++++++----------
 .../LoopVectorize/vplan-print-after.ll        |  8 +-
 3 files changed, 48 insertions(+), 44 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.h b/llvm/lib/Transforms/Vectorize/VPlanTransforms.h
index 07ad08aef471f..c4dcf740d6b07 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.h
@@ -59,7 +59,11 @@ struct VPlanTransforms {
            any_of(VPlanPrintAfterPasses, [PassName](StringRef Entry) {
              return Regex(Entry).match(PassName);
            }))) {
-        dbgs() << "VPlan after " << PassName << '\n';
+
+        dbgs()
+            << "VPlan for loop in '"
+            << Plan.getScalarHeader()->getIRBasicBlock()->getParent()->getName()
+            << "' after " << PassName << '\n';
         dbgs() << Plan << '\n';
       }
 #endif
diff --git a/llvm/test/Transforms/LoopVectorize/vplan-print-after-all.ll b/llvm/test/Transforms/LoopVectorize/vplan-print-after-all.ll
index 5b68887f0f7da..ae09cb1b1002e 100644
--- a/llvm/test/Transforms/LoopVectorize/vplan-print-after-all.ll
+++ b/llvm/test/Transforms/LoopVectorize/vplan-print-after-all.ll
@@ -1,55 +1,55 @@
-; RUN: opt -passes=loop-vectorize -disable-output -vplan-print-after-all -force-vector-width=4 -vplan-verify-each < %s 2>&1 | FileCheck %s --implicit-check-not "VPlan after"
+; RUN: opt -passes=loop-vectorize -disable-output -vplan-print-after-all -force-vector-width=4 -vplan-verify-each < %s 2>&1 | FileCheck %s --implicit-check-not "VPlan for loop in 'foo' after"
 ; RUN: opt -passes=loop-vectorize -disable-output -vplan-print-after-all -force-vector-width=4 -vplan-verify-each < %s 2>&1 | FileCheck %s --check-prefix CHECK-DUMP
 ; REQUIRES: asserts
 
 ; Verify that `-vplan-print-after-all` option works.
 
-; CHECK: VPlan after printAfterInitialConstruction
-; CHECK: VPlan after VPlanTransforms::clearReductionWrapFlags
-; CHECK: VPlan after VPlanTransforms::optimizeFindIVReductions
-; CHECK: VPlan after VPlanTransforms::handleMultiUseReductions
-; CHECK: VPlan after VPlanTransforms::handleMaxMinNumReductions
-; CHECK: VPlan after VPlanTransforms::handleFindLastReductions
-; CHECK: VPlan after VPlanTransforms::createPartialReductions
-; CHECK: VPlan after VPlanTransforms::convertToAbstractRecipes
-; CHECK: VPlan after VPlanTransforms::createInterleaveGroups
-; CHECK: VPlan after VPlanTransforms::replaceSymbolicStrides
-; CHECK: VPlan after VPlanTransforms::dropPoisonGeneratingRecipes
-; CHECK: VPlan after VPlanTransforms::adjustFixedOrderRecurrences
-; CHECK: VPlan after VPlanTransforms::truncateToMinimalBitwidths
-; CHECK: VPlan after removeRedundantCanonicalIVs
-; CHECK: VPlan after removeRedundantInductionCasts
-; CHECK: VPlan after simplifyRecipes
-; CHECK: VPlan after removeDeadRecipes
-; CHECK: VPlan after simplifyBlends
-; CHECK: VPlan after legalizeAndOptimizeInductions
-; CHECK: VPlan after narrowToSingleScalarRecipes
-; CHECK: VPlan after removeRedundantExpandSCEVRecipes
-; CHECK: VPlan after simplifyRecipes
-; CHECK: VPlan after removeBranchOnConst
-; CHECK: VPlan after removeDeadRecipes
-; CHECK: VPlan after createAndOptimizeReplicateRegions
-; CHECK: VPlan after hoistInvariantLoads
-; CHECK: VPlan after mergeBlocksIntoPredecessors
-; CHECK: VPlan after licm
-; CHECK: VPlan after VPlanTransforms::optimize
-; CHECK: VPlan after VPlanTransforms::materializeConstantVectorTripCount
-; CHECK: VPlan after VPlanTransforms::unrollByUF
-; CHECK: VPlan after VPlanTransforms::materializePacksAndUnpacks
-; CHECK: VPlan after VPlanTransforms::materializeBroadcasts
-; CHECK: VPlan after VPlanTransforms::replicateByVF
-; CHECK: VPlan after printFinalVPlan
+; CHECK: VPlan for loop in 'foo' after printAfterInitialConstruction
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::clearReductionWrapFlags
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::optimizeFindIVReductions
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::handleMultiUseReductions
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::handleMaxMinNumReductions
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::handleFindLastReductions
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::createPartialReductions
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::convertToAbstractRecipes
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::createInterleaveGroups
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::replaceSymbolicStrides
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::dropPoisonGeneratingRecipes
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::adjustFixedOrderRecurrences
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::truncateToMinimalBitwidths
+; CHECK: VPlan for loop in 'foo' after removeRedundantCanonicalIVs
+; CHECK: VPlan for loop in 'foo' after removeRedundantInductionCasts
+; CHECK: VPlan for loop in 'foo' after simplifyRecipes
+; CHECK: VPlan for loop in 'foo' after removeDeadRecipes
+; CHECK: VPlan for loop in 'foo' after simplifyBlends
+; CHECK: VPlan for loop in 'foo' after legalizeAndOptimizeInductions
+; CHECK: VPlan for loop in 'foo' after narrowToSingleScalarRecipes
+; CHECK: VPlan for loop in 'foo' after removeRedundantExpandSCEVRecipes
+; CHECK: VPlan for loop in 'foo' after simplifyRecipes
+; CHECK: VPlan for loop in 'foo' after removeBranchOnConst
+; CHECK: VPlan for loop in 'foo' after removeDeadRecipes
+; CHECK: VPlan for loop in 'foo' after createAndOptimizeReplicateRegions
+; CHECK: VPlan for loop in 'foo' after hoistInvariantLoads
+; CHECK: VPlan for loop in 'foo' after mergeBlocksIntoPredecessors
+; CHECK: VPlan for loop in 'foo' after licm
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::optimize
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::materializeConstantVectorTripCount
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::unrollByUF
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::materializePacksAndUnpacks
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::materializeBroadcasts
+; CHECK: VPlan for loop in 'foo' after VPlanTransforms::replicateByVF
+; CHECK: VPlan for loop in 'foo' after printFinalVPlan
 
 ; Also verify that VPlans are actually printed (we aren't interested in the
 ; exact dump content, just that it's performed):
 
-; CHECK-DUMP:      VPlan after printAfterInitialConstruction
+; CHECK-DUMP:      VPlan for loop in 'foo' after printAfterInitialConstruction
 ; CHECK-DUMP-NEXT: VPlan ' for UF>=1' {
 ;
-; CHECK-DUMP:      VPlan after VPlanTransforms::optimize{{$}}
+; CHECK-DUMP:      VPlan for loop in 'foo' after VPlanTransforms::optimize{{$}}
 ; CHECK-DUMP-NEXT: VPlan 'Initial VPlan for VF={4},UF>=1' {
 ;
-; CHECK-DUMP:      VPlan after printFinalVPlan
+; CHECK-DUMP:      VPlan for loop in 'foo' after printFinalVPlan
 ; CHECK-DUMP-NEXT: VPlan 'Final VPlan for VF={4},UF={1}' {
 
 define void @foo(ptr %ptr, i64 %n) {
diff --git a/llvm/test/Transforms/LoopVectorize/vplan-print-after.ll b/llvm/test/Transforms/LoopVectorize/vplan-print-after.ll
index 8014a4e480d65..56a2ad83007a8 100644
--- a/llvm/test/Transforms/LoopVectorize/vplan-print-after.ll
+++ b/llvm/test/Transforms/LoopVectorize/vplan-print-after.ll
@@ -3,13 +3,13 @@
 ; RUN:   2>&1 | FileCheck %s --implicit-check-not "VPlan after"
 ; REQUIRES: asserts
 
-; CHECK:      VPlan after simplifyRecipes
+; CHECK:      VPlan for loop in 'foo' after simplifyRecipes
 ; CHECK-NEXT: VPlan 'Initial VPlan for VF={4},UF>=1' {
-; CHECK:      VPlan after simplifyBlends
+; CHECK:      VPlan for loop in 'foo' after simplifyBlends
 ; CHECK-NEXT: VPlan 'Initial VPlan for VF={4},UF>=1' {
-; CHECK:      VPlan after simplifyRecipes
+; CHECK:      VPlan for loop in 'foo' after simplifyRecipes
 ; CHECK-NEXT: VPlan 'Initial VPlan for VF={4},UF>=1' {
-; CHECK:      VPlan after printFinalVPlan
+; CHECK:      VPlan for loop in 'foo' after printFinalVPlan
 ; CHECK-NEXT: VPlan 'Final VPlan for VF={4},UF={1}' {
 
 define void @foo(ptr %ptr, i64 %n) {

>From e46f57bf5f7ddab430b7b871ce1573f4ab184d9d Mon Sep 17 00:00:00 2001
From: Andrei Elovikov <andrei.elovikov at sifive.com>
Date: Fri, 6 Feb 2026 12:20:43 -0800
Subject: [PATCH 2/2] Update VPlan UTC to use `-vplan-print-after=`

---
 .../first-order-recurrence-chains-vplan.ll    |  2 +-
 ...-order-recurrence-sink-replicate-region.ll |  2 +-
 .../LoopVectorize/vplan-printing-metadata.ll  |  2 +-
 .../vplan-printing-reductions.ll              |  2 +-
 .../LoopVectorize/vplan-printing.ll           |  2 +-
 .../vplan-sink-scalars-and-merge-vf1.ll       |  2 +-
 .../Inputs/vplan.ll                           |  4 +-
 .../Inputs/vplan.ll.expected                  |  4 +-
 llvm/utils/UpdateTestChecks/common.py         |  4 ++
 llvm/utils/update_analyze_test_checks.py      | 44 +++----------------
 10 files changed, 20 insertions(+), 48 deletions(-)

diff --git a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
index 9ab2557387877..648ea5297f042 100644
--- a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
+++ b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
 ; REQUIRES: asserts
 
-; RUN: opt -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -debug-only=loop-vectorize -disable-output -S %s 2>&1 | FileCheck %s
+; RUN: opt -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -vplan-print-after="optimize$" -disable-output -S %s 2>&1 | FileCheck %s
 
 define void @test_chained_first_order_recurrences_1(ptr %ptr) {
 ; CHECK-LABEL: 'test_chained_first_order_recurrences_1'
diff --git a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
index 6992a441f9444..b398a96662f47 100644
--- a/llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
+++ b/llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
 ; REQUIRES: asserts
-; RUN: opt < %s -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=1 -force-widen-divrem-via-safe-divisor=0 -disable-output -debug-only=loop-vectorize 2>&1 | FileCheck %s
+; RUN: opt < %s -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=1 -force-widen-divrem-via-safe-divisor=0 -disable-output -vplan-print-after="optimize$" 2>&1 | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
 
diff --git a/llvm/test/Transforms/LoopVectorize/vplan-printing-metadata.ll b/llvm/test/Transforms/LoopVectorize/vplan-printing-metadata.ll
index 027bfe859c828..d780a799c9d49 100644
--- a/llvm/test/Transforms/LoopVectorize/vplan-printing-metadata.ll
+++ b/llvm/test/Transforms/LoopVectorize/vplan-printing-metadata.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
 ; REQUIRES: asserts
 
-; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -disable-output %s 2>&1 | FileCheck %s
+; RUN: opt -passes=loop-vectorize -vplan-print-after="optimize$" -force-vector-interleave=1 -force-vector-width=4 -disable-output %s 2>&1 | FileCheck %s
 
 define void @test_widen_metadata(ptr noalias %A, ptr noalias %B, i32 %n) {
 ; CHECK-LABEL: 'test_widen_metadata'
diff --git a/llvm/test/Transforms/LoopVectorize/vplan-printing-reductions.ll b/llvm/test/Transforms/LoopVectorize/vplan-printing-reductions.ll
index b282a9079c996..46f6e872ab2e9 100644
--- a/llvm/test/Transforms/LoopVectorize/vplan-printing-reductions.ll
+++ b/llvm/test/Transforms/LoopVectorize/vplan-printing-reductions.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
 ; REQUIRES: asserts
 
-; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -prefer-inloop-reductions -disable-output %s 2>&1 | FileCheck %s
+; RUN: opt -passes=loop-vectorize -vplan-print-after="optimize$" -force-vector-interleave=1 -force-vector-width=4 -prefer-inloop-reductions -disable-output %s 2>&1 | FileCheck %s
 
 ; Tests for printing VPlans with reductions.
 
diff --git a/llvm/test/Transforms/LoopVectorize/vplan-printing.ll b/llvm/test/Transforms/LoopVectorize/vplan-printing.ll
index 1d5d71b0a64c0..c9a186cb3f1f8 100644
--- a/llvm/test/Transforms/LoopVectorize/vplan-printing.ll
+++ b/llvm/test/Transforms/LoopVectorize/vplan-printing.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
 ; REQUIRES: asserts
 
-; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -enable-interleaved-mem-accesses=true -enable-masked-interleaved-mem-accesses -force-widen-divrem-via-safe-divisor=0 -disable-output %s 2>&1 | FileCheck --strict-whitespace %s
+; RUN: opt -passes=loop-vectorize -vplan-print-after="optimize$" -force-vector-interleave=1 -force-vector-width=4 -enable-interleaved-mem-accesses=true -enable-masked-interleaved-mem-accesses -force-widen-divrem-via-safe-divisor=0 -disable-output %s 2>&1 | FileCheck --strict-whitespace %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 
diff --git a/llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll b/llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll
index 3896e67c81b1b..63c2d618bbd26 100644
--- a/llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll
+++ b/llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
 ; REQUIRES: asserts
 
-; RUN: opt -passes=loop-vectorize -force-vector-interleave=2 -force-vector-width=1 -debug -disable-output %s 2>&1 | FileCheck %s
+; RUN: opt -passes=loop-vectorize -force-vector-interleave=2 -force-vector-width=1 -vplan-print-after="optimize$" -disable-output %s 2>&1 | FileCheck %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 
diff --git a/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll b/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll
index 1ef134466cfcf..8b0dd716fc1ff 100644
--- a/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll
+++ b/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll
@@ -1,5 +1,5 @@
-; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize -force-vector-width=4 \
-; RUN:   -disable-output %s 2>&1 | FileCheck %s
+; RUN: opt -passes=loop-vectorize -vplan-print-after="optimize$" \
+; RUN:   -force-vector-width=4 -disable-output %s 2>&1 | FileCheck %s
 
 define void @simple(ptr %p, i64 %n) {
 entry:
diff --git a/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll.expected b/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll.expected
index 5d0cf220faf75..970ba6afb567d 100644
--- a/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/vplan.ll.expected
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize -force-vector-width=4 \
-; RUN:   -disable-output %s 2>&1 | FileCheck %s
+; RUN: opt -passes=loop-vectorize -vplan-print-after="optimize$" \
+; RUN:   -force-vector-width=4 -disable-output %s 2>&1 | FileCheck %s
 
 define void @simple(ptr %p, i64 %n) {
 ; CHECK-LABEL: 'simple'
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 9cca0a7ad5d38..5fcc056a4bb6d 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -597,6 +597,10 @@ def invoke_tool(exe, cmd_args, ir, preprocess_cmd=None, verbose=False):
     r"^\s*\'(?P<func>[\w.$-]+?)\'[^\n]*" r"\s*\n(?P<body>.*)$", flags=(re.X | re.S)
 )
 
+VPLAN_RE = re.compile(
+    r"\'(?P<func>[\w.$-]+?)\'[^\n]*\n(?P<body>.*)\n$", flags=(re.X | re.S)
+)
+
 IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@"?([\w.$-]+)"?\s*\(')
 IR_FUNCTION_LABEL_RE = re.compile(
     r'^\s*(?:define\s+(?:internal\s+)?[^@]*)?@"?([\w.$-]+)"?\s*\('
diff --git a/llvm/utils/update_analyze_test_checks.py b/llvm/utils/update_analyze_test_checks.py
index bd249a53f458f..cc55f72425b16 100755
--- a/llvm/utils/update_analyze_test_checks.py
+++ b/llvm/utils/update_analyze_test_checks.py
@@ -41,27 +41,6 @@
 from UpdateTestChecks import common
 
 
-def extract_vplan(raw_output):
-    """
-    Extract a VPlan block from loop-vectorize debug output using brace-depth
-    tracking.
-    TODO: Remove once only -vplan-print-after is supported.
-    """
-    result = []
-    brace_depth = 0
-    for line in raw_output.splitlines():
-        if not brace_depth and line.startswith("VPlan 'Initial VPlan"):
-            brace_depth = 1
-            result.append(line)
-            continue
-        if brace_depth:
-            brace_depth += line.count("{") - line.count("}")
-            result.append(line)
-            if brace_depth == 0:
-                break
-    return "\n".join(result) if result else None
-
-
 def update_test(opt_basename: str, ti: common.TestInfo):
     triple_in_ir = None
     for l in ti.input_lines:
@@ -120,33 +99,22 @@ def update_test(opt_basename: str, ti: common.TestInfo):
 
         raw_tool_outputs = common.invoke_tool(ti.args.opt_binary, opt_args, ti.path)
 
-        # Detect VPlan output for LV pass. Don't use VPlan mode if filters are
-        # active since the user is likely filtering to specific LV debug lines
-        # (e.g., cost model).
-        is_vplan_output = (
-            not ti.args.filters
-            and re.search(r"VPlan 'Initial VPlan", raw_tool_outputs) is not None
-        )
-
         regex_map = {
             r"Printing analysis ": common.ANALYZE_FUNCTION_RE,
             r"(LV|LDist|HashRecognize): Checking a loop in ": common.LOOP_PASS_DEBUG_RE,
+            r"VPlan for loop in ": common.VPLAN_RE,
         }
 
         for split_by, regex in regex_map.items():
             if re.search(split_by, raw_tool_outputs) is None:
                 continue
             for raw_tool_output in re.split(split_by, raw_tool_outputs):
-                if is_vplan_output:
-                    vplan_output = extract_vplan(raw_tool_output)
-                    if not vplan_output:
-                        continue
-                    # Reconstruct minimal output: function header line + VPlan
-                    func_header = raw_tool_output.split("\n")[0]
-                    raw_tool_output = "\n".join([func_header, vplan_output])
-
                 # For VPlan mode, don't scrub whitespace - preserve exact alignment
-                scrubber = (lambda body: body) if is_vplan_output else common.scrub_body
+                scrubber = (
+                    (lambda body: body)
+                    if regex == common.VPLAN_RE
+                    else common.scrub_body
+                )
                 builder.process_run_line(
                     regex,
                     scrubber,



More information about the llvm-commits mailing list