public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97707] New: avx12 math function invoked even if -mprefer-vector-width=256 specified
@ 2020-11-03 18:05 vincenzo.innocente at cern dot ch
  2020-11-04  8:24 ` [Bug tree-optimization/97707] avx512 " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2020-11-03 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97707
           Summary: avx12 math function invoked even if
                    -mprefer-vector-width=256 specified
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch
  Target Milestone: ---

this code will invoke _ZGVeN8v_sin instead of _ZGVdN4v_sin making use of zmm
registers
#include<cmath>

int main() {

  double res=0;

  for (int x=0; x<1024;x++) {
    double y = x; 
    res += std::sin(y);
  }


 return res > 0.5;

}

NOTE if I specify
for (long long x=0; x<1024;x++) {

it will correcty invoke _ZGVdN4v_sin (no zmm)


compiler options
-Ofast -march=skylake-avx512 -mprefer-vector-width=256

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

end of thread, other threads:[~2020-11-04  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 18:05 [Bug tree-optimization/97707] New: avx12 math function invoked even if -mprefer-vector-width=256 specified vincenzo.innocente at cern dot ch
2020-11-04  8:24 ` [Bug tree-optimization/97707] avx512 " rguenth at gcc dot gnu.org
2020-11-04  8:47 ` jakub at gcc dot gnu.org
2020-11-04  8:57 ` vincenzo.innocente at cern dot ch
2020-11-04  8:59 ` 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).