[llvm] [PGO][test] Specify exact match for check labels (PR #117376)
Ken Matsui via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 12:43:50 PST 2024
https://github.com/ken-matsui created https://github.com/llvm/llvm-project/pull/117376
Some check labels in the basic.ll test are simply f[1-3], which matches all cases where the function entry is hot, cold, or uncategorized. Since the actual test results for each label have mixed cases, the current labels can be considered ambiguous.
This patch specifies exact matches for each label to ensure more precise validation and to prevent potential regressions in the future.
>From 4d73c0164eec4a8c298680034a970ddb94913234 Mon Sep 17 00:00:00 2001
From: Ken Matsui <ken.matsui at mediatek.com>
Date: Fri, 22 Nov 2024 15:16:21 -0500
Subject: [PATCH] [PGO][test] Specify exact match for check labels
Some check labels in the basic.ll test are simply f[1-3], which matches
all cases where the function entry is hot, cold, or uncategorized.
Since the actual test results for each label have mixed cases, the
current labels can be considered ambiguous.
This patch specifies exact matches for each label to ensure more precise
validation and to prevent potential regressions in the future.
---
llvm/test/Analysis/ProfileSummary/basic.ll | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/llvm/test/Analysis/ProfileSummary/basic.ll b/llvm/test/Analysis/ProfileSummary/basic.ll
index 966a1117c47d14..5a2d03c346903f 100644
--- a/llvm/test/Analysis/ProfileSummary/basic.ll
+++ b/llvm/test/Analysis/ProfileSummary/basic.ll
@@ -5,9 +5,9 @@
define void @f1() !prof !20 {
; CHECK-LABEL: f1 :hot
-; OVERRIDE-HOT-LABEL: f1
+; OVERRIDE-HOT-LABEL: f1{{$}}
; OVERRIDE-COLD-LABEL: f1 :hot
-; OVERRIDE-BOTH-LABEL: f1
+; OVERRIDE-BOTH-LABEL: f1{{$}}
ret void
}
@@ -15,17 +15,17 @@ define void @f1() !prof !20 {
define void @f2() !prof !21 {
; CHECK-LABEL: f2 :cold
; OVERRIDE-HOT-LABEL: f2 :cold
-; OVERRIDE-COLD-LABEL: f2
-; OVERRIDE-BOTH-LABEL: f2
+; OVERRIDE-COLD-LABEL: f2{{$}}
+; OVERRIDE-BOTH-LABEL: f2 :cold
ret void
}
define void @f3() !prof !22 {
-; CHECK-LABEL: f3
-; OVERRIDE-HOT-LABEL: f3
-; OVERRIDE-COLD-LABEL: f3
-; OVERRIDE-BOTH-LABEL: f3
+; CHECK-LABEL: f3 :hot
+; OVERRIDE-HOT-LABEL: f3{{$}}
+; OVERRIDE-COLD-LABEL: f3 :hot
+; OVERRIDE-BOTH-LABEL: f3 :cold
ret void
}
More information about the llvm-commits
mailing list