public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58497] New: SLP vectorizes identical operations
@ 2013-09-22  7:04 glisse at gcc dot gnu.org
  2013-09-23  8:33 ` [Bug tree-optimization/58497] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-22  7:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58497

            Bug ID: 58497
           Summary: SLP vectorizes identical operations
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org

typedef float float4 __attribute__((vector_size(16)));

float4 g(int x)
{
  float4 W;
  W[0]=W[1]=W[2]=W[3]=x+1;
  return W;
}

is vectorized by SLP to:

  vect_cst_.4_11 = {x_1(D), x_1(D), x_1(D), x_1(D)};
  vect__2.3_13 = vect_cst_.4_11 + { 1, 1, 1, 1 };
  vect__3.6_14 = (vector(4) floatD.38) vect__2.3_13;

Maybe when a vector is really the same scalar copied into all slots it would be
better not to turn the scalar ops into vector ops? (turning the 4 BIT_FIELD_REF
writes into a constructor is still good though)


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

end of thread, other threads:[~2021-08-14 23:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-22  7:04 [Bug tree-optimization/58497] New: SLP vectorizes identical operations glisse at gcc dot gnu.org
2013-09-23  8:33 ` [Bug tree-optimization/58497] " rguenth at gcc dot gnu.org
2013-09-23  9:03 ` rguenth at gcc dot gnu.org
2015-10-22 13:37 ` rguenth at gcc dot gnu.org
2015-10-22 13:37 ` rguenth at gcc dot gnu.org
2021-08-14 23:27 ` pinskia 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).