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 optimization/2962] inefficient code with and


------- 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


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