public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61403] New: An opportunity for x86 gcc vectorizer (~40% gain)
@ 2014-06-03 13:16 evstupac at gmail dot com
  2014-06-18  7:46 ` [Bug tree-optimization/61403] " kyukhin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: evstupac at gmail dot com @ 2014-06-03 13:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61403
           Summary: An opportunity for x86 gcc vectorizer (~40% gain)
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evstupac at gmail dot com

Test normalizing 3D coordinates failed to vectorize

#include <math.h> 

struct XYZ 
{ 
  float x; 
  float y; 
  float z; 
}; 

void 
norm (struct XYZ *in, struct XYZ *out, int size) 
{ 
  int i; 
  for (i = 0; i < size; ++i) 
    { 
      float n = sqrt(in[i].x * in[i].x + in[i].y * in[i].y + in[i].z *
in[i].z); 
      out[i].x = in[i].x / n;
      out[i].y = in[i].y / n;
      out[i].z = in[i].z / n;
    } 
} 

gcc norm.c -Ofast -S -mssse3 -fdump-tree-vect-details

norm.c:14:3: note: type of def: 3. 
norm.c:14:3: note: no array mode for V4SF[3] 
norm.c:14:3: note: the size of the group of accesses is not a power of 2
norm.c:14:3: note: not vectorized: relevant stmt not supported: _19->x = _20;

Vectorization should give ~40% gain on x86


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

end of thread, other threads:[~2015-01-22 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03 13:16 [Bug tree-optimization/61403] New: An opportunity for x86 gcc vectorizer (~40% gain) evstupac at gmail dot com
2014-06-18  7:46 ` [Bug tree-optimization/61403] " kyukhin at gcc dot gnu.org
2015-01-22 14:13 ` jakub at gcc dot gnu.org
2015-01-22 15:05 ` evstupac at gmail dot com

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