[Bug optimization/2962] inefficient code with and

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 29 05:22:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-29 05:22 -------
A better way to deal with this is to convert the trees from
a (i)
{
  short int T.0;
  int t;

  T.0 = *i;
  t = (int)T.0;
  return t & 1;
}

into
a1 (i)
{
  short int t;
  short int tt;
  int ttt;

  t = *i;
  tt = t & 1;
  ttt = (int)tt;
  return ttt;
}
But that would only fix the problem on PPC.
To fix the problem on x86, mode changing needs to happen with subregisters instead of 
full registers which is what is causing these problems.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2003-11-09 20:23:53         |2004-03-29 05:22:50
               date|                            |


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



More information about the Gcc-bugs mailing list