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/50088] movzbl is generated instead of movl


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

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-17 14:37:35 UTC ---
The testcase has ...

  int n8 = (arr[7] * 9 + 8) & 15;

  for (i = 0; i < len; i+=8)
    {
      n1 = (n1 + 1) & 15;

      s += arr[i] << n1;

The shift count is 32bit, which causes 32bit spill. Since shift/rotate
instructions only take 8bit register (CL) as shift count, we load 8bit
into CL. How do we solve this?


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