Skip to content

[PGO] Fix instrprof-api.c on Windows #77508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

qiongsiwu
Copy link
Contributor

@qiongsiwu qiongsiwu commented Jan 9, 2024

#76471 introduced a new test but the check lines have over-restrictive patterns for a string variable name that cause test failures on Windows (e.g. https://lab.llvm.org/buildbot/#/builders/127/builds/60637/steps/4/logs/stdio). This PR fixes the test.

@qiongsiwu qiongsiwu self-assigned this Jan 9, 2024
@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations labels Jan 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2024

@llvm/pr-subscribers-pgo

Author: Qiongsi Wu (qiongsiwu)

Changes

#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 --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()

Copy link
Contributor

@snehasish snehasish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@qiongsiwu
Copy link
Contributor Author

The precommit CI is waiting for a long time. I tested this PR locally and it looks good. I am landing the PR.

@qiongsiwu qiongsiwu merged commit b6d1577 into llvm:main Jan 9, 2024
vitalybuka added a commit that referenced this pull request Jan 10, 2024
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
llvm#76471 introduced a new test
but the check lines have over-restrictive patterns for a string variable
name that cause test failures on Windows (e.g.
https://lab.llvm.org/buildbot/#/builders/127/builds/60637/steps/4/logs/stdio).
This PR fixes the test.
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-rt PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants