public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/36431] New: The C++ front-end produces some NOP_EXPR for vector types Date: Wed, 04 Jun 2008 00:19:00 -0000 [thread overview] Message-ID: <bug-36431-6528@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2008-06-04 0:19 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-06-04 0:19 pinskia at gcc dot gnu dot org [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-36431-6528@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).