Skip to content

Conversation

@mstorsjo
Copy link
Member

This fixes these tests for Windows on armv7.

This fixes these tests for Windows on armv7.
@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations labels Apr 24, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 24, 2025

@llvm/pr-subscribers-pgo

Author: Martin Storsjö (mstorsjo)

Changes

This fixes these tests for Windows on armv7.


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

2 Files Affected:

  • (modified) compiler-rt/test/profile/instrprof-api.c (+7-7)
  • (modified) compiler-rt/test/profile/instrprof-reset-counters.c (+1-1)
diff --git a/compiler-rt/test/profile/instrprof-api.c b/compiler-rt/test/profile/instrprof-api.c
index 07c5b2f453907..b8063ffa94937 100644
--- a/compiler-rt/test/profile/instrprof-api.c
+++ b/compiler-rt/test/profile/instrprof-api.c
@@ -19,22 +19,22 @@ __attribute__((noinline)) int bar() { return 4; }
 
 int foo() {
   __llvm_profile_reset_counters();
-  // PROFGEN: call void @__llvm_profile_reset_counters()
-  // PROFUSE-NOT: call void @__llvm_profile_reset_counters()
+  // PROFGEN: call {{(arm_aapcs_vfpcc )*}}void @__llvm_profile_reset_counters()
+  // PROFUSE-NOT: call {{(arm_aapcs_vfpcc )*}}void @__llvm_profile_reset_counters()
   return bar();
 }
 
-// PROFUSE-NOT: declare void @__llvm_profile_reset_counters()
+// PROFUSE-NOT: declare {{(arm_aapcs_vfpcc )*}}void @__llvm_profile_reset_counters()
 
 int main() {
   int z = foo() + 3;
   __llvm_profile_set_filename("rawprof.profraw");
-  // PROFGEN: call void @__llvm_profile_set_filename(ptr noundef @{{.*}})
-  // PROFUSE-NOT: call void @__llvm_profile_set_filename(ptr noundef @{{.*}})
+  // PROFGEN: call {{(arm_aapcs_vfpcc )*}}void @__llvm_profile_set_filename(ptr noundef @{{.*}})
+  // PROFUSE-NOT: call {{(arm_aapcs_vfpcc )*}}void @__llvm_profile_set_filename(ptr noundef @{{.*}})
   if (__llvm_profile_dump())
     return 2;
-  // PROFGEN: %{{.*}} = call {{(signext )*}}i32 @__llvm_profile_dump()
-  // PROFUSE-NOT: %{{.*}} = call {{(signext )*}}i32 @__llvm_profile_dump()
+  // PROFGEN: %{{.*}} = call {{(arm_aapcs_vfpcc )*}}{{(signext )*}}i32 @__llvm_profile_dump()
+  // PROFUSE-NOT: %{{.*}} = call {{(arm_aapcs_vfpcc )*}}{{(signext )*}}i32 @__llvm_profile_dump()
   return z + bar() - 11;
 }
 
diff --git a/compiler-rt/test/profile/instrprof-reset-counters.c b/compiler-rt/test/profile/instrprof-reset-counters.c
index f15bc0d8e3a1a..93dfb0edfff9f 100644
--- a/compiler-rt/test/profile/instrprof-reset-counters.c
+++ b/compiler-rt/test/profile/instrprof-reset-counters.c
@@ -12,7 +12,7 @@ int main(void) {
   return 0;
 }
 void foo(int N) {
-  // CHECK-LABEL: define{{( dso_local)?}} void @foo(
+  // CHECK-LABEL: define{{( dso_local)?}}{{( arm_aapcs_vfpcc)?}} void @foo(
   // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[FOO:[0-9]+]]
   if (N) {}
 }

__llvm_profile_reset_counters();
// PROFGEN: call void @__llvm_profile_reset_counters()
// PROFUSE-NOT: call void @__llvm_profile_reset_counters()
// PROFGEN: call {{(arm_aapcs_vfpcc )*}}void @__llvm_profile_reset_counters()
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Any reason to use * instead of ??

Copy link
Member Author

Choose a reason for hiding this comment

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

You’re quite observant! No, there’s no specific reason for it; I did this file first, and it used other similar patterns with * (that also probably could be ?) so I matched that style of the surrounding file - then the other file has preexisting regexes with ? instead, so I matched that there.

I can change both files to use ? for the new patterns for consistency.

@mstorsjo mstorsjo merged commit 3e56f5f into llvm:main Apr 25, 2025
10 checks passed
@mstorsjo mstorsjo deleted the compiler-rt-test-profile-vfpcc branch April 25, 2025 09:18
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
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.

3 participants