[clang] [PowerPC] make `_Complex` ABI GCC-compatible (PR #208917)
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 29 15:29:14 PST 2026
brad0 wrote:
On OpenBSD, FreeBSD and NetBSD, Clang already returns `_Complex` types up to 8 bytes in r3/r4, because `-msvr4-struct-return` is the default there. So those returns already match GCC. Linux uses sret.
With `<2 x i32>` and `-maltivec`, the return moves to v2, so this would be a regression on the BSDs. Using `i64` as Matt suggested keeps it in r3/r4.
Could you add an OpenBSD RUN line to ppc32-complex-abi.c? The `-fclang-abi-compat=23` output is different there.
https://github.com/llvm/llvm-project/pull/208917
More information about the cfe-commits
mailing list