public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC vectorization of math functions similar to what LLVM does...
@ 2014-09-25 13:27 leon zadorin
  2014-09-26 11:12 ` James Greenhalgh
  0 siblings, 1 reply; 2+ messages in thread
From: leon zadorin @ 2014-09-25 13:27 UTC (permalink / raw)
  To: gcc-help

Hello,

a quick question on whether GCC can do (auto) vectorization of math
functions like pow, exp, log, sin, cos, et. al. as per similar to what
LLVM suggests of being able to do:
http://llvm.org/docs/Vectorizers.html#vectorization-of-function-calls

Is GCC (e.g. 4.9.1) capable of something similar?

Regards
Leon.

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

* Re: GCC vectorization of math functions similar to what LLVM does...
  2014-09-25 13:27 GCC vectorization of math functions similar to what LLVM does leon zadorin
@ 2014-09-26 11:12 ` James Greenhalgh
  0 siblings, 0 replies; 2+ messages in thread
From: James Greenhalgh @ 2014-09-26 11:12 UTC (permalink / raw)
  To: leon zadorin; +Cc: gcc-help

On Thu, Sep 25, 2014 at 02:27:04PM +0100, leon zadorin wrote:
> Hello,
> 
> a quick question on whether GCC can do (auto) vectorization of math
> functions like pow, exp, log, sin, cos, et. al. as per similar to what
> LLVM suggests of being able to do:
> http://llvm.org/docs/Vectorizers.html#vectorization-of-function-calls
> 
> Is GCC (e.g. 4.9.1) capable of something similar?

Yes, though as with LLVM, which builtin functions are considered for
vectorization will depend on the architecture you are targetting.

The relevant target hook to look for in the GCC sources is
"TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION" [1].

Cheers,
James

---

[1] https://gcc.gnu.org/onlinedocs/gccint/Addressing-Modes.html#Addressing-Modes

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

end of thread, other threads:[~2014-09-26 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-25 13:27 GCC vectorization of math functions similar to what LLVM does leon zadorin
2014-09-26 11:12 ` James Greenhalgh

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