public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: leon zadorin <leonleon77@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: GCC vectorization of math functions similar to what LLVM does...
Date: Fri, 26 Sep 2014 11:12:00 -0000	[thread overview]
Message-ID: <20140926111216.GA30080@arm.com> (raw)
In-Reply-To: <CAPpySAZZiGjXk-YFqacJn2xnLW2UHNjwXv+Php90R3NBZ4U7Fg@mail.gmail.com>

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

      reply	other threads:[~2014-09-26 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 13:27 leon zadorin
2014-09-26 11:12 ` James Greenhalgh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140926111216.GA30080@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=leonleon77@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).