public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56118] New: No constant propagation in vector field assignment
@ 2013-01-26 17:37 glisse at gcc dot gnu.org
  2013-01-26 17:57 ` [Bug tree-optimization/56118] " glisse at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-01-26 17:37 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56118
           Summary: No constant propagation in vector field assignment
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: glisse@gcc.gnu.org
            Target: x86_64-linux-gnu


Hello,

with this code:

#include <x86intrin.h>
__m128d f(){
  __m128d r={3,4};
  r[0]=1;
  r[1]=2;
  return r;
}

gcc sees the following and fails to optimize it:

  r = { 3.0e+0, 4.0e+0 };
  BIT_FIELD_REF <r, 64, 0> = 1.0e+0;
  BIT_FIELD_REF <r, 64, 64> = 2.0e+0;

Nothing fixes it at the RTL level either, so we end up with:

    movapd    .LC0(%rip), %xmm0
    movlpd    .LC1(%rip), %xmm0
    movhpd    .LC2(%rip), %xmm0


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

end of thread, other threads:[~2013-01-28 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-26 17:37 [Bug tree-optimization/56118] New: No constant propagation in vector field assignment glisse at gcc dot gnu.org
2013-01-26 17:57 ` [Bug tree-optimization/56118] " glisse at gcc dot gnu.org
2013-01-28 10:44 ` [Bug tree-optimization/56118] Piecewise vector / complex initialization from constants not combined rguenth at gcc dot gnu.org
2013-01-28 12:40 ` glisse 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).