[compiler-rt] [PGO] Fix `instrprof-api.c` on Windows (PR #77508)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 10:42:20 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-pgo

Author: Qiongsi Wu (qiongsiwu)

<details>
<summary>Changes</summary>

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.  

---
Full diff: https://github.com/llvm/llvm-project/pull/77508.diff


1 Files Affected:

- (modified) compiler-rt/test/profile/instrprof-api.c (+2-2) 


``````````diff
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()

``````````

</details>


https://github.com/llvm/llvm-project/pull/77508


More information about the llvm-commits mailing list