http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61119
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Richard Biener from comment #4) > Tricky case, but fold also handles REALPART / IMAGPART of +, - and conjugate > and of a cexpi call. Of course that may not matter in the end, as > "easily decompose" probably doesn't apply to those simplifications (as shown > here). That was my point. Replacing cexp with exp*expi does not gain anything in itself, the hope is that either exp or expi gets further simplifications (possibly because it is a constant). In most (of the rare) cases where the folding of realpart of + helps, we probably missed an optimization where we could have folded + to something better (likely a complex_expr in the end). Anyway, except possibly for the constant folding, the transformation should eventually move to gimple-only where there won't be those save_expr issues.