https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83349
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2017-12-11 CC| |glisse at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Component|tree-optimization |middle-end Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- IIRC we had this simplificatio in fold-const.c at some point. Eventually we thought moving it to tree-ssa-reassoc.c. There we have <bb 2> [local count: 1073741825]: _1 = __builtin_pow (a_5(D), x_6(D)); reassocpow_9 = __builtin_powi (a_5(D), 4); _7 = _1 * reassocpow_9; which suggests we miss (mult (pow @0 @1) (powi @0 @2)) -> (pow @0 (plus @1 @2)). And also (mult (pow @0 @1) @0) of course. Not sure if there is anything besides FP contraction to look for validity.