linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Cyril Bur <cyrilbur@gmail.com>, linuxppc-dev@ozlabs.org
Subject: Re: [2/2] selftests/powerpc: benchmarks/context_switch.c use vector instructions/types
Date: Wed,  6 Jul 2016 00:10:09 +1000 (AEST)	[thread overview]
Message-ID: <3rkQkn73Lyz9t0T@ozlabs.org> (raw)
In-Reply-To: <1457046400-29276-2-git-send-email-cyrilbur@gmail.com>

On Thu, 2016-03-03 at 23:06:40 UTC, Cyril Bur wrote:
> Currently it doesn't appear the resulting binary actually uses any Altivec
> or VSX instructions the solution is to explicitly tell GCC to use vector
> instructions and use vector types in the code.
> 
> Part of this this issue can be GCC version specific:
> 
> GCC 4.9.x is happy to use Altivec and VSX instructions if altivec.h is
> includedi (and possibly if vector types are used), this also means that
> 4.9.x will use VSX instructions even if only -maltivec is passed. It is
> also possible that Altivec instructions will be used even without -maltivec
> or -mabi=altivec.
> 
> GCC 5.2.x complains about the lack of -maltivec parameter if altivec.h is
> included and will not use VSX unless -mvsx is present on commandline.
> 
> GCC 5.3.0 has a regression that means __attribute__((__target__("no-vsx"))
> fails to build. A fix is targeted for 5.4.
> 
> Furthermore LTO (Link Time Optimisation) doesn't play well with
> __attribute__((__target__("no-vsx")), LTO can cause GCC to forget about the
> attribute and compile with VSX instructions regardless. Be weary when
> enabling -flfo for this test.
> 
> Signed-off-by: Cyril Bur <cyrilbur@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/f2418ae8a81760b4dec8d5e3e7

cheers

  reply	other threads:[~2016-07-05 14:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 23:06 [PATCH 1/2] selftests/powerpc: benchmarks/context_switch.c improve usage message Cyril Bur
2016-03-03 23:06 ` [PATCH 2/2] selftests/powerpc: benchmarks/context_switch.c use vector instructions/types Cyril Bur
2016-07-05 14:10   ` Michael Ellerman [this message]
2019-01-23  8:47   ` Christophe Leroy
2016-07-05 14:10 ` [1/2] selftests/powerpc: benchmarks/context_switch.c improve usage message Michael Ellerman

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=3rkQkn73Lyz9t0T@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=cyrilbur@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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 NNTP newsgroup(s).