public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Ellcey <sellcey@cavium.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: gcc <gcc@gcc.gnu.org>
Subject: Re: Can I use -Ofast without libmvec
Date: Thu, 22 Mar 2018 18:48:00 -0000	[thread overview]
Message-ID: <1521744513.18659.63.camel@cavium.com> (raw)
In-Reply-To: <CAMe9rOqLG=kGcEY76na2ZyEZPKLi0ngQafovT+=CXE8ex6GYWw@mail.gmail.com>

On Thu, 2018-03-22 at 11:42 -0700, H.J. Lu wrote:
> On Thu, Mar 22, 2018 at 11:08 AM, Steve Ellcey <sellcey@cavium.com>
> wrote:
> > 
> > I have a question about the math vector library routines in
> > libmvec.
> > If I compile a program on x86 with -Ofast, something like:
> > 
> > void foo(double * __restrict x, double * __restrict y, double *
> > __restrict z)
> > {
> >         for (int i = 0; i < 1000; i++) x[i] = sin(y[i]);
> > }
> > 
> > I get a call to the vector sin routine _ZGVbN2v_sin.  That is fine, but
> > is there some way to compile with -Ofast and not use the libmvec vector
> > routines?  I have tried -fopenmp, -fopenmp-simd, -fno-openmp, and -fno-
> > openmp-simd and I always get a call to _ZGVbN2v_sin.  Is there anyway
> > to stop the use of the vectorized calls (without turning off -Ofast)?
> Have you tried -lm?

It isn't a question of not working.  Everything works and links and
runs, but I would just like to know if there is any way to compile my
program in such a way that GCC does not generate calls to the libmvect
routines.

I am doing some performance analysis and would like to know how much
(or little) having these vectorized routines help in various
benchmarks.

Steve Ellcey

  reply	other threads:[~2018-03-22 18:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 18:09 Steve Ellcey
2018-03-22 18:42 ` H.J. Lu
2018-03-22 18:48   ` Steve Ellcey [this message]
2018-03-22 18:52     ` Richard Biener
2018-03-22 19:42 ` Andrew Senkevich
2018-03-22 21:35 ` Jakub Jelinek
2018-03-23 12:40   ` Richard Biener

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=1521744513.18659.63.camel@cavium.com \
    --to=sellcey@cavium.com \
    --cc=gcc@gcc.gnu.org \
    --cc=hjl.tools@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).