Skip to content

[tools] Allow RegClass/Bank in update_givaluetracking_test_checks.py #141727

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
May 28, 2025

Conversation

Pierre-vh
Copy link
Contributor

The script previously assumed an underscore after the :

The script previously assumed an underscore after the :
@Pierre-vh Pierre-vh requested review from arsenm and davemgreen May 28, 2025 08:09
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Pierre-vh Pierre-vh marked this pull request as ready for review May 28, 2025 08:09
@llvmbot
Copy link
Member

llvmbot commented May 28, 2025

@llvm/pr-subscribers-testing-tools

Author: Pierre van Houtryve (Pierre-vh)

Changes

The script previously assumed an underscore after the :


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

3 Files Affected:

  • (modified) llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir (+1-1)
  • (modified) llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir.expected (+2-2)
  • (modified) llvm/utils/update_givaluetracking_test_checks.py (+1-1)
diff --git a/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir b/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir
index b04b376414cd9..197364c4b6b5f 100644
--- a/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir
+++ b/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir
@@ -20,7 +20,7 @@ body:             |
   ; CHECK-NEXT: %4:_ KnownBits:???????????????????????????????? SignBits:1
     %0:gpr32 = COPY $w0
     %1:_(s32) = COPY %0
-    %named:_(s64) = G_ZEXT %1
+    %named:gpr64(s64) = G_ZEXT %1
     %3:_(s32), %4:_(s32) = G_UNMERGE_VALUES %named(s64)
     $w0 = COPY %3(s32)
     $w1 = COPY %4(s32)
diff --git a/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir.expected b/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir.expected
index c5b08bd47de81..dabcd508dd5eb 100644
--- a/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_givaluetracking_test_checks/Inputs/const.mir.expected
@@ -18,12 +18,12 @@ body:             |
   ; Note: This comment should not be removed, the check lines below should be updated
   ; CHECK-LABEL: name: @Test2
   ; CHECK-NEXT: %1:_ KnownBits:???????????????????????????????? SignBits:1
-  ; CHECK-NEXT: %named:_ KnownBits:00000000000000000000000000000000???????????????????????????????? SignBits:32
+  ; CHECK-NEXT: %named:gpr64 KnownBits:00000000000000000000000000000000???????????????????????????????? SignBits:32
   ; CHECK-NEXT: %3:_ KnownBits:???????????????????????????????? SignBits:1
   ; CHECK-NEXT: %4:_ KnownBits:00000000000000000000000000000000 SignBits:32
     %0:gpr32 = COPY $w0
     %1:_(s32) = COPY %0
-    %named:_(s64) = G_ZEXT %1
+    %named:gpr64(s64) = G_ZEXT %1
     %3:_(s32), %4:_(s32) = G_UNMERGE_VALUES %named(s64)
     $w0 = COPY %3(s32)
     $w1 = COPY %4(s32)
diff --git a/llvm/utils/update_givaluetracking_test_checks.py b/llvm/utils/update_givaluetracking_test_checks.py
index 3a8f5395e8eb3..49b068ac7bef0 100755
--- a/llvm/utils/update_givaluetracking_test_checks.py
+++ b/llvm/utils/update_givaluetracking_test_checks.py
@@ -22,7 +22,7 @@
 
 VT_FUNCTION_RE = re.compile(
     r"\s*name:\s*@(?P<func>[A-Za-z0-9_-]+)"
-    r"(?P<body>(\s*%[0-9a-zA-Z_]+:_\s*KnownBits:[01?]+\sSignBits:[0-9]+$)+)",
+    r"(?P<body>(\s*%[0-9a-zA-Z_]+:[A-Za-z0-9_-]+\s*KnownBits:[01?]+\sSignBits:[0-9]+$)+)",
     flags=(re.X | re.M),
 )
 

Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

Nice. LGTM

@Pierre-vh Pierre-vh merged commit 0184873 into main May 28, 2025
10 of 15 checks passed
@Pierre-vh Pierre-vh deleted the users/pierre-vh/rcrb-givaluetracking branch May 28, 2025 08:29
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants