Skip to content

[utils] Add a script to update regclass numbers in MIR tests#142761

Merged
jayfoad merged 1 commit into
llvm:mainfrom
jayfoad:update-mir-regclass-numbers
Jul 21, 2025
Merged

[utils] Add a script to update regclass numbers in MIR tests#142761
jayfoad merged 1 commit into
llvm:mainfrom
jayfoad:update-mir-regclass-numbers

Conversation

@jayfoad

@jayfoad jayfoad commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@shiltian shiltian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not really familiar with our rules regarding implementing utils. Do we need it to be in Python for portability? Other than that, this looks good to me.

CC @nikic @tstellar

@s-barannikov

s-barannikov commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

There aren't so many MIR tests that contain this kind of comment (I counted only 40). Why don't just use update_mir_test_checks.py?

@jayfoad

jayfoad commented Jul 21, 2025

Copy link
Copy Markdown
Contributor Author

There aren't so many MIR tests that contain this kind of comment (I counted only 112 *.mir and 87 *.ll). Why don't just use update_mir_test_checks.py?

This is a different kind of update. It is not just updating CHECK lines, it is also updating the source lines, like (example from #142359):

-    INLINEASM &"; def $0", 1 /* sideeffect attdialect */, 1966090 /* regdef:VGPR_32 */, def $vgpr0
+    INLINEASM &"; def $0", 1 /* sideeffect attdialect */, 2228234 /* regdef:VGPR_32 */, def $vgpr0

@s-barannikov

Copy link
Copy Markdown
Contributor

I agree with @arsenm here #142359 (comment)

While this script may be useful, it doesn't guarantee the tests don't rot over time. Unless we have an automated way to update them, that is.

@jayfoad

jayfoad commented Jul 21, 2025

Copy link
Copy Markdown
Contributor Author

I agree with @arsenm here #142359 (comment)

Me too, and I would happily remove this script when that suggestion is implemented.

@arsenm arsenm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's better than nothing

@jayfoad jayfoad merged commit f7347e9 into llvm:main Jul 21, 2025
11 of 13 checks passed
@jayfoad jayfoad deleted the update-mir-regclass-numbers branch July 21, 2025 17:47
@llvm-ci

llvm-ci commented Jul 21, 2025

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder amdgpu-offload-ubuntu-22-cmake-build-only running on rocm-docker-ubu-22 while building llvm at step 2 "update-annotated-scripts".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/17416

Here is the relevant piece of the build log for the reference
Step 2 (update-annotated-scripts) failure: update (failure)
git version 2.34.1
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Could not resolve host: github.com
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Could not resolve host: github.com

mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 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.

5 participants