This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/32503] __builtin_powi - optimize for other exponents besides 2 and 0.5



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]