[llvm] [ARM][TableGen][MC] Change the ARM mnemonic operands to be optional for ASM parsing (PR #83436)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 00:29:02 PDT 2024


mstorsjo wrote:

This change broke building FFmpeg for arm targets. Assembling https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/arm/vp8_armv6.S#L73-L75 produces the following error:
```
src/libavcodec/arm/vp8_armv6.S:74:27: error: asr operand expected.
        pkhtbne r11, r11, r11, asr #16
                          ^
src/libavcodec/arm/vp8_armv6.S:75:9: error: incorrect condition in IT block; got 'al', but expected 'ne'
        ldr r8, [r0, #16] @ code_word
        ^
```

It can be reproduced with the following standalone test snippet:
```assembly
        .syntax unified
        @.thumb

        it ne
        pkhtbne r11, r11, r11, asr #16
        nop
```
Built like this:
```console
$ clang -target armv7-linux-gnueabihf -c repro.s
repro.s:5:27: error: asr operand expected.
        pkhtbne r11, r11, r11, asr #16
                          ^
repro.s:6:9: error: incorrect condition in IT block; got 'al', but expected 'ne'
        nop
        ^
```

Please consider reverting this if you can't come up with a fix during the day. (Or I can push a revert myself.)

Also, as a side note, from the merged git commit, I see that you have your email address hidden on github. Apparently the bot didn't make a comment about that for some reason. So, from https://github.com/llvm/llvm-project/blob/main/.github/workflows/email-check.yaml, please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account, and see [LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information.

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


More information about the llvm-commits mailing list