public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36431]  New: The C++ front-end produces some NOP_EXPR for vector types
@ 2008-06-04  0:19 pinskia at gcc dot gnu dot org
  2008-06-04  0:20 ` [Bug c++/36431] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-06-04  0:19 UTC (permalink / raw)
  To: gcc-bugs

While looking into a performance issue in 4.1.1 on PowerPC, I noticed that the
C++ front-end produces a NOP_EXPR for a vector type.  This caused the following
performance testcase to fail:
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-options "-O2" } */

// We should not produce any addi but instead use li for this function as
// the two address expressions should be done correctly.
/* { dg-final { scan-assembler-not "addi" } } */

#include <altivec.h>

typedef vector float SIMD_Vector;
struct g
{
  vector float l[2];
};
vector float f(const struct g &a, const struct g &a1)
{
  SIMD_Vector g0 = vec_splat (a.l[1], 0);
  SIMD_Vector g1 = vec_splat (a.l[1], 1);
  SIMD_Vector g2 = vec_splat (a1.l[1], 1);
  SIMD_Vector g3 = vec_splat (a1.l[1], 2);
  return g0 + g1 + g2 + g3;
}

---- CUT ---

Note on the trunk it works correctly as we prop the &a->l[1] into the indirect
reference during forwprop but the C++ front-end is still produce the weird IR.


-- 
           Summary: The C++ front-end produces some NOP_EXPR for vector
                    types
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc*-*-*


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


^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <bug-36431-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-11-06 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-04  0:19 [Bug c++/36431] New: The C++ front-end produces some NOP_EXPR for vector types pinskia at gcc dot gnu dot org
2008-06-04  0:20 ` [Bug c++/36431] " pinskia at gcc dot gnu dot org
2008-06-04  0:20 ` pinskia at gcc dot gnu dot org
2008-09-25 23:09 ` pinskia at gcc dot gnu dot org
2010-03-02 18:58 ` pinskia at gcc dot gnu dot org
     [not found] <bug-36431-4@http.gcc.gnu.org/bugzilla/>
2011-11-06 11:31 ` paolo.carlini at oracle 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).