https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111876
Bug ID: 111876 Summary: aarch64: Wrong code for bf16 complex mul/div when the target has +fp16 support. Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: iains at gcc dot gnu.org Target Milestone: --- this is somewhat similar to PR111867, but in this case the issue seems to happen at expand time. ---- reduced from "bfloat16-complex.c" volatile __bf16 a = 1.0bf16; typedef _Complex float __cbf16 __attribute__((__mode__(__BC__))); volatile __cbf16 b = __builtin_complex (2.0bf16, 3.0bf16); int main (void) { volatile __cbf16 r ; r = a + b; r *= r; return 0; } ---- For -march=armv8.4-a+fp16 This lowers to calls to (non-existent libgcc) ___mulbc3 (and __divbc3, when division is included). For -march=armv8.4-a This promotes the bf16 -> float and calls __mulsc3 (which exists)