This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/24074] New: (vector float){0, 0, b, a} code gen as not good as it should be


Take the following code:
#define vector __attribute__((vector_size(16)))

float a; float b;
vector float fb(void) { return (vector float){ 0,0,b,a};}
--------
Currently we produce:
        movss   _a, %xmm1
        movss   _b, %xmm0
        unpcklps        %xmm1, %xmm0
        movaps  %xmm0, %xmm1
        xorps   %xmm0, %xmm0
        movlhps %xmm1, %xmm0
        ret
-----

But from what I hear the xorps and movlhps are useless instructions because those bits are already 
zero.

-- 
           Summary: (vector float){0, 0, b, a} code gen as not good as it
                    should be
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, ssemmx
          Severity: minor
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i786-pc-darwin7.9


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]