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 middle-end/25186] (short)(((int)short_var) <<1) should be done in short



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-30 18:32 -------
It also should be done for:
int f1(void)
{
  *a  = (short)(((int)(unsigned short)*a) << 1);
}

Which is a little more complicated on the tree level than the RTL level:
tree level:
  *a.1 = (short int) ((int) (short unsigned int) *a.1 << 1);

RTL level just has a zero_extend.


-- 


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


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