[llvm] [AArch64] Initial compiler support for SVE unwind on Windows. (PR #138609)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 04:47:59 PDT 2025
mstorsjo wrote:
With this merged, I run into issues with projects that detect support for SVE, which previously bailed out.
The main issue is hitting issues with codeview debug info; I saw that you have a hack for this at https://github.com/llvm/llvm-project/commit/5e3fa842d15a0be130dcd2b6671a0176f30af8c3. You'd need to extend this to cover the predicate registers too; I'm hitting this with `P0` in one repro.
If compiling without optimization, I'm hitting another assert relating to codeview debug info too - I presume this is the other unresolved detail you mentioned in the commit message in that hack.
Repro:
```c
typedef __attribute__((neon_vector_type(16))) signed char int8x16_t;
typedef __SVInt8_t svint8_t;
typedef __SVBool_t svbool_t;
__attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_n_s8))) svint8_t
svdup_n_s8(char);
void svsel_s8(svbool_t, svint8_t, svint8_t);
__attribute__((__clang_arm_builtin_alias(__builtin_sve_svundef_s8))) svint8_t
svundef_s8();
svbool_t svwhilelt_b8(int, int);
__attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s8)))
svint8_t svset_neonq_s8(svint8_t, int8x16_t);
int8x16_t saoCuStatsE1_sve2_endY_in;
void saoCuStatsE1_sve2_endY() {
svbool_t svpred = svwhilelt_b8(0, 0);
svsel_s8(svpred, svset_neonq_s8(svundef_s8(), saoCuStatsE1_sve2_endY_in),
svdup_n_s8(3));
}
```
```console
$ clang -target aarch64-windows-msvc -c repro.c -march=armv9-a -g -O2
fatal error: error in backend: unknown codeview register P0
$ clang -target aarch64-windows-msvc -c repro.c -march=armv9-a -g
clang: ../lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:1281: void llvm::CodeViewDebug::collectVariableInfoFromMFTable(llvm::DenseSet<std::pair<const llvm::DINode*, const llvm::DILocation*> >&): Assertion `!FrameOffset.getScalable() && "Frame offsets with a scalable component are not supported"' failed.
```
https://github.com/llvm/llvm-project/pull/138609
More information about the llvm-commits
mailing list