[llvm] [tools] Allow RegClass/Bank in update_givaluetracking_test_checks.py (PR #141727)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 01:10:26 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-testing-tools

Author: Pierre van Houtryve (Pierre-vh)

<details>
<summary>Changes</summary>

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
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),
 )
 

``````````

</details>


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


More information about the llvm-commits mailing list