[Bug rtl-optimization/24082] New: Not that good register allocating on powerpc for vectors

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug rtl-optimization/24082] New: Not that good register allocating on powerpc for vectors

cvs-commit at gcc dot gnu.org
Take the following code:
vector int bar3(long long x)
{
  return (vector int)(vector long long){x,x};
}
---
Currently we get:
_bar3:
        mfspr r0,256
        stw r0,-8(r1)
        oris r0,r0,0x8000
        mtspr 256,r0
        addi r2,r1,-32
        stw r3,0(r2)
        stw r4,4(r2)
        stw r3,8(r2)
        stw r4,12(r2)
        lvx v0,0,r2
        lwz r12,-8(r1)
        vor v2,v0,v0
        mtspr 256,r12
        blr
But we should really allocate v0 in v2, removing the save/restore/setting of VRSAVE.
Like:
_bar3:
        addi r2,r1,-32
        stw r3,0(r2)
        stw r4,4(r2)
        stw r3,8(r2)
        stw r4,12(r2)
        lvx v2,0,r2
        blr

--
           Summary: Not that good register allocating on powerpc for vectors
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, ra
          Severity: enhancement
          Priority: P2
         Component: rtl-optimization
        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: powerpc-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24082
Reply | Threaded
Open this post in threaded view
|

[Bug rtl-optimization/24082] Not that good register allocating on powerpc for vectors

cvs-commit at gcc dot gnu.org

------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-27 14:56 -------
This is with -maltivec -O2.

--


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