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 target/26515] New: peephole2 causes unrecognized insn, zero_extending non-general register


Noticed with revision 108225 plus local changes,
not noticed with revision 111226 plus local changes.

This code, compiled with -fpic -Os or -fpic -O2:
void
_nrrdSwap64Endian (void *_data, unsigned int N)
{
  long long *data = 0;
  long long l = 0;
  long long fix = 0;
  unsigned int I;
  if (_data)
    {
      data = (long long *) _data;
      for (I = 0; I < N; I++)
        {
          l = data[I];
          fix = (l & 0x00000000000000FF);
          fix = ((l & 0x000000000000FF00) >> 0x08) | (fix << 0x08);
          fix = ((l & 0x0000000000FF0000) >> 0x10) | (fix << 0x08);
          fix = ((l & 0x00000000FF000000) >> 0x18) | (fix << 0x08);
          fix = ((l & 0x000000FF00000000LL) >> 0x20) | (fix << 0x08);
          fix = ((l & 0x0000FF0000000000LL) >> 0x28) | (fix << 0x08);
          fix = ((l & 0x00FF000000000000LL) >> 0x30) | (fix << 0x08);
          data[I] = fix;
        }
    }
}
yields:
/tmp/e.i:1916: error: insn does not satisfy its constraints:
(insn 300 57 301 2 (set (reg:SI 6 r6)
        (zero_extend:SI (reg:HI 17 mof))) 53 {zero_extendhisi2} (nil)
    (nil))
due to a bug in cris.md:andu (peephole2) that it does not exclude non-general
registers for operand 1.


-- 
           Summary: peephole2 causes unrecognized insn, zero_extending non-
                    general register
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: hp at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
GCC target triplet: cris-axis-linux-gnu


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


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