[compiler-rt] [PGO] Fix `instrprof-api.c` on Windows (PR #77508)
Qiongsi Wu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 10:41:49 PST 2024
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/77508
https://github.com/llvm/llvm-project/pull/76471 introduced a new test but the check line has over-restrictive pattern for a string variable name that causes test failure on Windows (e.g. https://lab.llvm.org/buildbot/#/builders/127/builds/60637/steps/4/logs/stdio). This PR fixes the test.
>From 9438766d75819e6cc2af8c270bacdde840bad46f Mon Sep 17 00:00:00 2001
From: Qiongsi Wu <qwu at ibm.com>
Date: Tue, 9 Jan 2024 13:39:41 -0500
Subject: [PATCH] Fix test instrprof-api.c on Windows. Use a more general
pattern for string name.
---
compiler-rt/test/profile/instrprof-api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/test/profile/instrprof-api.c b/compiler-rt/test/profile/instrprof-api.c
index 1381300c1ad18a..b6f75426b2a717 100644
--- a/compiler-rt/test/profile/instrprof-api.c
+++ b/compiler-rt/test/profile/instrprof-api.c
@@ -29,8 +29,8 @@ int foo() {
int main() {
int z = foo() + 3;
__llvm_profile_set_filename("rawprof.profraw");
- // PROFGEN: call void @__llvm_profile_set_filename(ptr noundef @.str)
- // PROFUSE-NOT: call void @__llvm_profile_set_filename(ptr noundef @.str)
+ // PROFGEN: call void @__llvm_profile_set_filename(ptr noundef @{{.*}})
+ // PROFUSE-NOT: call void @__llvm_profile_set_filename(ptr noundef @{{.*}})
if (__llvm_profile_dump())
return 2;
// PROFGEN: %call1 = call {{(signext )*}}i32 @__llvm_profile_dump()
More information about the llvm-commits
mailing list