Issue |
91187
|
Summary |
[AArch64] [CodeView] unknown codeview register Z0
|
Labels |
backend:AArch64,
debuginfo,
platform:windows
|
Assignees |
|
Reporter |
mstorsjo
|
If trying to compile code that uses SVE, with CodeView debug info enabled, one easily hits this error.
To reproduce:
```c
#include <arm_neon_sve_bridge.h>
uint64_t aom_sum_squares_2d_i16_wxh_sve() {
svint64_t sum_squares = svdup_n_s64(0);
return svaddv_s64(svptrue_b64(), sum_squares);
}
```
```console
$ clang -target aarch64-windows-gnu -c sve-debuginfo.c -march=armv8.2-a+sve -O2 -g -gcodeview
fatal error: error in backend: unknown codeview register Z0
```
Fixing this requires MS to define how the SVE registers are to be expressed in codeview debug info.
CC @pmsjt @dpaoliello
(This issue was mentioned in https://github.com/llvm/llvm-project/issues/64278#issuecomment-2081507917, but splitting this out to a separate issue, as it's unrelated to the previous one.)
If not compiling with `-O2`, one hits #80009 instead. But once that is implemented correctly, we still need codeview definitions for these registers.
Also as a side note, if trying to build with `-target aarch64-windows-msvc`, one hits these errors instead:
```
In file included from <prefix>/lib/clang/19/include/arm_neon_sve_bridge.h:15:
<prefix>/lib/clang/19/include/arm_sve.h:271:1: error: cannot mangle this built-in __SVInt8_t type yet
271 | __aio __attribute__((target("sve"))) svint8_t svreinterpret_s8(svint8_t op) __arm_streaming_compatible {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
272 | return __builtin_sve_reinterpret_s8_s8(op);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
273 | }
| ~
<prefix>/lib/clang/19/include/arm_sve.h:125:15: note: expanded from macro '__aio'
125 | #define __aio static __inline__ __attribute__((__always_inline__, __nodebug__, __overloadable__))
| ^
<prefix>/lib/clang/19/include/arm_sve.h:271:1: error: cannot mangle this built-in __SVInt8_t type yet
271 | __aio __attribute__((target("sve"))) svint8_t svreinterpret_s8(svint8_t op) __arm_streaming_compatible {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
272 | return __builtin_sve_reinterpret_s8_s8(op);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
273 | }
| ~
<prefix>/lib/clang/19/include/arm_sve.h:125:15: note: expanded from macro '__aio'
125 | #define __aio static __inline__ __attribute__((__always_inline__, __nodebug__, __overloadable__))
| ^
2 errors generated.
```
But that's also a separate issue that probably should be tracked separately.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs