This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32503] __builtin_powi - optimize for other exponents besides 2 and 0.5
- From: "jb at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2007 19:00:21 -0000
- Subject: [Bug middle-end/32503] __builtin_powi - optimize for other exponents besides 2 and 0.5
- References: <bug-32503-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jb at gcc dot gnu dot org 2007-06-26 19:00 -------
(In reply to comment #2)
> Confirmed. I had done tree-level expansion of powi into add/mul sequences at
> one time. But this had been rejected for some reason I cannot remember right
> now.
The middle-end is able to expand builtin_powi for constant integers. The
problem with vectorization is that the vectorizer runs before the pow(i)
expansion, and the vectorizer is only aware of exponenets 2 and 0.5. Expanding
in the FE works around that problem. In fact, it seems the FE expander is
lifted from the ME.
--
jb at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32503