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 rtl-optimization/46888] missed optimization of zero_extract with constant inputs


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.12.10 19:42:11
            Version|unknown                     |4.6.0
     Ever Confirmed|0                           |1
           Severity|normal                      |enhancement

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-12-10 19:42:11 UTC ---
Here is a simpler example. Take:
struct b
{
  int t;
  int tt;
};
union a
{
  long long t;
  struct b b;
};
long long f(int i, int t)
{
  long long ii = ((long long)i) << 32;
  union a a;
  a.t = 0;
  a.b.t = i;
  a.b.tt = t;
  return a.t;
}

--- CUT ---
For MIPS64r2 (both n64 and n32):
    move    $2,$0
    dins    $2,$4,32,32
    j    $31
    dins    $2,$5,0,32
--- CUT ---
is produced but the first two instructions can really be done as one shift:
        dsll    $2,$4,32
    j    $31
    dins    $2,$5,0,32


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