[Bug tree-optimization/83354] Missed optimization in math expression: pow(cbrt(x), y) == pow(x, y / 3)

2018-11-01 Thread zamazan4ik at tut dot by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83354

--- Comment #2 from Alexander Zaitsev  ---
Yes, you are right. My bad. Closing this issue.

[Bug tree-optimization/83354] Missed optimization in math expression: pow(cbrt(x), y) == pow(x, y / 3)

2018-11-01 Thread zamazan4ik at tut dot by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83354

Alexander Zaitsev  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

[Bug tree-optimization/83354] Missed optimization in math expression: pow(cbrt(x), y) == pow(x, y / 3)

2017-12-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83354

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-12-11
 CC||rguenth at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
We have that:

  (simplify
   (pows (cbrts tree_expr_nonnegative_p@0) @1)
   (pows @0 (mult @1 { build_real_truncate (type, dconst_third ()); })))

the constraint is that we have to know x is not negative.  If you
write pow(cbrt(fabs(x)), y) you'll see.

So WORKSFORME?