[libc-commits] [clang] [libc] [libcxx] [clang][X86] Emit AVX level mismatch psABI warnings on function definitions (PR #199091)

Aiden Grossman via libc-commits libc-commits at lists.llvm.org
Fri May 22 10:37:27 PDT 2026


boomanaiden154 wrote:

> For libmvec we intentionally upscale from a f32x8 to a f64x8 which will now always fire a warning if I understand correctly. The original intent of these warnings from what I understood was mixing ABIs accross TU boundaries, which is why we force all of these to be static.

You can run into ABI issues within a single translation unit too because the calling convention is dependent upon the caller's features. e.g. if `foo` is marked `avx512f` and calls `baz` (with a 512-bit vector type), it will use zmm registers. If in the same translation unit you have `bar` which doesn't have any `avx512f` features and it calls `baz`, it will pass the argument on the stack.

But given LLVM libc and libc++ happen to work, I would assume there aren't massive ABI issues like that and we shouldn't be warning in those cases.

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


More information about the libc-commits mailing list