[compiler-rt] [Compiler-rt] Add AArch64 routines for __arm_agnostic("sme_za_state") (PR #120059)
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 26 11:52:38 PST 2024
ZequanWu wrote:
> > Is that expected? Are we holding something wrong? Or is that too little information to say something useful?
>
> I don't think it's expected (looks like the chrome build is clang trunk).
>
> It looks like the `+sme2` support detection is not working:
>
> ```c++
> // Fails to build on clang trunk (+sme2 not set)
> void foo(void) __arm_streaming_compatible {
> asm(".arch armv9-a+sme2");
> asm("smstart");
> asm("ldr zt0, [sp]");
> }
> // (side note: It seems smstart does not require +sme to be assembled)
> ```
>
> See: https://godbolt.org/z/osdfGd6dn
>
> It looks like either of these would work:
>
> ```c++
> // Builds successfully on clang trunk.
> __attribute__((target("arch=armv9-a+sme2")))
> void foo(void) __arm_streaming_compatible {
> asm("smstart");
> asm("ldr zt0, [sp]");
> }
>
> // OR:
>
> void foo2(void) __arm_streaming_compatible {
> asm(".arch armv9-a+sme2\n"
> "smstart\n"
> "ldr zt0, [sp]\n");
> }
> ```
>
> See: https://godbolt.org/z/aqTTvKcE5
Is it a regression introduced by this change? If so, please revert it if it takes a while to fix it.
https://github.com/llvm/llvm-project/pull/120059
More information about the llvm-commits
mailing list