jcai19 marked an inline comment as done.
jcai19 added a comment.

In D103184#2793055 <https://reviews.llvm.org/D103184#2793055>, @DavidSpickett 
wrote:

>   $ cat /tmp/test.s
>   irg x0, x0
>   $ aarch64-unknown-linux-gnu-as -march=armv8.5-a+memtag -march=armv8.1-a 
> /tmp/test.s -o /dev/null
>   /tmp/test.s: Assembler messages:
>   /tmp/test.s:1: Error: selected processor does not support `irg x0,x0'
>
> GAS is also taking the last value of `march`. So if we were to follow clang 
> Arm's behaviour, the result would be the same.
>
> Except we don't have to rely on the llvm backend picking the last of 
> "target-feature". Which probably works for architecture versions but for 
> individual extensions I don't think so.
>
> If we make it additive this could happen:
>
>   -march=armv8.5-a+memtag -march=armv8.2-a
>
> Becomes: (mte is the backend name for memtag for silly reasons)
>
>   -target-feature +v8.5-a -target-feature mte -target-feature +v8.2-a
>
> So now instead of getting `v8.2` only, the user now has `v8.2+memtag`. Only 
> if they do `armv8.2-a+nomemtag` will they get what they expect (well, what 
> I'd expect). Which means they'd need to know every previous march value.

Thanks for double checking!  I've changed my implementation since I made that 
comment to take the last value of -Wa,march (and only for assembly files) and 
added more test cases. It should now follows the Arm behavior.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103184/new/

https://reviews.llvm.org/D103184

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to