qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Rebecca Cran <rebecca@bsdio.com>,
	qemu-devel@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>,
	Laurent Vivier <laurent@vivier.eu>,
	qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang
Date: Thu, 8 Aug 2019 22:22:03 -0700	[thread overview]
Message-ID: <57083e0b-2853-7f5b-16ec-83bc22f237fa@linaro.org> (raw)
In-Reply-To: <20190809041952.57302-1-rebecca@bsdio.com>

On 8/8/19 9:19 PM, Rebecca Cran wrote:
> clang doesn't support the GCC pragma to enable AVX2, but instead
> requires the command line option -mavx2. Since GCC also supports that,
> remove the pragma lines and add the -mavx2 option when building the
> test.

No, this means we're not testing what we need:

We need to compile exactly one function using avx2.

The other functions should be compiled with sse4 and sse2, respectively, and we
choose between them by testing cpuid bits at startup.  If you supply -mavx2 to
the entire compilation, then the routine that is supposed to use only sse2 will
in fact use avx2, and then the runtime selection is moot.


r~


  parent reply	other threads:[~2019-08-09  5:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09  4:19 [Qemu-devel] [PATCH] Update the avx2 configure test to be compatible with clang Rebecca Cran
2019-08-09  4:52 ` no-reply
2019-08-09  5:22 ` Richard Henderson [this message]
2019-08-09 15:17   ` Rebecca Cran

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=57083e0b-2853-7f5b-16ec-83bc22f237fa@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rebecca@bsdio.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 NNTP newsgroup(s).