public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99100] New: Inconsistent vector length used in autovectorizer for AVX-512
@ 2021-02-15  5:23 shibatch.sf.net at gmail dot com
  2021-02-15  8:36 ` [Bug tree-optimization/99100] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: shibatch.sf.net at gmail dot com @ 2021-02-15  5:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99100

            Bug ID: 99100
           Summary: Inconsistent vector length used in autovectorizer for
                    AVX-512
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shibatch.sf.net at gmail dot com
  Target Milestone: ---

When AVX512 instruction is available, the auto-vectorizer in gcc 
sometimes generates calls to AVX2 functions instead of AVX512 functions.
-mprefer-vector-width=512 does not affect the result.


$ cat vabitest.c
#include <stdio.h>
#include <math.h>

_Pragma ("omp declare simd simdlen(8) notinbranch") 
__attribute__((const)) double myfunc(double x);

#define N 1024
__attribute__ ((__aligned__(256))) double a[N], b[N], c[N];

int main(void) {
   for (int i = 0; i < N; i++) a[i] = myfunc(b[i]);
   for (int i = 0; i < N; i++) c[i] = sin(b[i]);
}

$ gcc-10 -ffast-math -O3 -mavx512f -fopenmp vabitest.c -S -o- | grep _ZGV
         call    _ZGVdN8v_myfunc@PLT
         call    _ZGVeN8v_sin@PLT

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

end of thread, other threads:[~2021-02-16  8:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15  5:23 [Bug c/99100] New: Inconsistent vector length used in autovectorizer for AVX-512 shibatch.sf.net at gmail dot com
2021-02-15  8:36 ` [Bug tree-optimization/99100] " rguenth at gcc dot gnu.org
2021-02-15  9:01 ` [Bug target/99100] " rguenth at gcc dot gnu.org
2021-02-15  9:43 ` jakub at gcc dot gnu.org
2021-02-16  8:01 ` cvs-commit at gcc dot gnu.org
2021-02-16  8:03 ` jakub at gcc dot gnu.org

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