https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101612
Bug ID: 101612 Summary: _Complex float multiply expansion does not allow for a tail call to __mulsc3 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: _Complex float f(_Complex float x, _Complex float y) { return x*y; } ----- CUT ----- At -O2, we produce during complex lowering: if (_13 unord _14) goto <bb 4>; [0.05%] else goto <bb 3>; [99.95%] <bb 4> [local count: 536864]: _15 = __mulsc3 (x$real_5, x$imag_6, y$real_7, y$imag_8); _16 = REALPART_EXPR <_15>; _17 = IMAGPART_EXPR <_15>; GIMPLE_NOP <bb 3> [local count: 1073741824]: # _18 = PHI <_13(2), _16(4)> # _19 = PHI <_14(2), _17(4)> _3 = COMPLEX_EXPR <_18, _19>; This does allow __mulsc3 to be tailed call as the tail call coding does not know anything about COMPLEX_EXPR and REAL/IMAGPART_EXPR.