This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/83349] Missed optimization in math expression: aggressive optimization with std::pow
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Dec 2017 08:51:48 +0000
- Subject: [Bug middle-end/83349] Missed optimization in math expression: aggressive optimization with std::pow
- Auto-submitted: auto-generated
- References: <bug-83349-4@http.gcc.gnu.org/bugzilla/>
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.