public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54978] New: Add ability to provide vectorized functions
@ 2012-10-18 17:51 ddesics at gmail dot com
  2012-10-19  8:46 ` [Bug tree-optimization/54978] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ddesics at gmail dot com @ 2012-10-18 17:51 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54978

             Bug #: 54978
           Summary: Add ability to provide vectorized functions
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ddesics@gmail.com


Presently, the auto-vectorizer chokes on any function calls present in a loop. 
It would be nice to be able to provide vectorized versions of functions, as
well as non-vectorized versions, and let the auto-vectorizer notice these.

This is already done for transcendental functions when -mveclibabi is used. 
However, to do this, some standardized form for the vectorized function would
have to be defined. 

For instance, assuming sse type functions with double precision as an example,
this could be done as follows.

C++: the simple case because overloading is available

double fx(double x);
v2df fx(v2df x);

C: this is more difficult, but something should be doable.  To prevent
accidental name overlap, a new function attribute could be used, to define a
vectorized version, i.e.: 

double fx(double x) __attribute__((vectorized_alias(fxv2df)));
v2df fxv2df(v2df x);


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-16  4:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 17:51 [Bug tree-optimization/54978] New: Add ability to provide vectorized functions ddesics at gmail dot com
2012-10-19  8:46 ` [Bug tree-optimization/54978] " rguenth at gcc dot gnu.org
2012-10-19 10:01 ` jakub at gcc dot gnu.org
2012-10-19 16:14 ` ddesics at gmail dot com
2021-08-16  4:44 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).