public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/95839] New: Failure to optimize addition of vector elements to vector addition
@ 2020-06-23 12:26 gabravier at gmail dot com
  2020-06-23 14:26 ` [Bug tree-optimization/95839] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gabravier at gmail dot com @ 2020-06-23 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95839
           Summary: Failure to optimize addition of vector elements to
                    vector addition
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

typedef float __attribute__((vector_size(8))) v2f32;

v2f32 f(v2f32 a, v2f32 b)
{
    return (v2f32){a[0] + b[0], a[1] + b[1]};
}

This can be optimized to `return a + b;`. This transformation is done by LLVM,
but not by GCC.

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

end of thread, other threads:[~2020-07-01 11:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 12:26 [Bug tree-optimization/95839] New: Failure to optimize addition of vector elements to vector addition gabravier at gmail dot com
2020-06-23 14:26 ` [Bug tree-optimization/95839] " rguenth at gcc dot gnu.org
2020-06-24 15:00 ` ubizjak at gmail dot com
2020-06-24 16:05 ` rguenth at gcc dot gnu.org
2020-06-24 16:10 ` rguenth at gcc dot gnu.org
2020-06-25 10:52 ` rguenth at gcc dot gnu.org
2020-06-25 13:56 ` cvs-commit at gcc dot gnu.org
2020-06-25 14:54 ` rguenth at gcc dot gnu.org
2020-07-01 11:32 ` cvs-commit at gcc dot gnu.org
2020-07-01 11:34 ` rguenth 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).