[llvm] [update_mir_test_checks] Add missing MIFlags (PR #150012)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 23 01:52:51 PDT 2025
ritter-x2a wrote:
> Arm uses 't' for Thumb instructions and 't2' for Thumb2 instructions I'm afraid. I'm not sure why that was used but it helps distinguish them from the normal "Arm" mode instructions, like `tADDi8` vs `t2ADDri` vs `ADDri`. If those were accounted for then maybe it would work? But this sounds OK to me either way.
Thanks, that's good to know! I've updated the PR to add a comment explaining that in the script.
So, we could probably use `([a-z-]+ )*` (lower-case letters and `-`) for the list of MIFlags and `[a-z0-9_]*[A-Z][A-Za-z0-9_]*` (upper- and lower-case letters and `_`, with at least one upper-case letter) for opcodes.
It's hard to validate that though; when I try to regenerate all mir tests that contain a comment stating that they were generated with this script, 675 of the 3133 tests are regenerated differently, and the script fails for 26 tests. Those numbers are the same with the patterns as they are in the PR and with the ones mentioned above, FWIW.
Are there strong opinions to use the more generic patterns anyway?
https://github.com/llvm/llvm-project/pull/150012
More information about the llvm-commits
mailing list