[llvm] [PGO][test] Specify exact match for check labels (PR #117376)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 12:45:13 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: Ken Matsui (ken-matsui)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/117376.diff
1 Files Affected:
- (modified) llvm/test/Analysis/ProfileSummary/basic.ll (+8-8)
``````````diff
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
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/117376
More information about the llvm-commits
mailing list