This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57071] Optimize (-1)**k to 1 - 2 * mod(K, 2)
- 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: Fri, 26 Apr 2013 09:16:41 +0000
- Subject: [Bug fortran/57071] Optimize (-1)**k to 1 - 2 * mod(K, 2)
- Auto-submitted: auto-generated
- References: <bug-57071-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57071
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-26 09:16:41 UTC ---
Note that for the (-1.0)**k case __builtin_powif (-1.0e+0, k) should be
perfectly fine for the middle-end. _gfortran_pow_i4_i4 (-1, k) is of
course unfortunate and should be optimized by the frontend.