Bug 42249 - unrecognizable insn for 254.gap with sel-sched
Summary: unrecognizable insn for 254.gap with sel-sched
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Alexander Monakov
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-12-02 00:42 UTC by Janis Johnson
Modified: 2010-01-14 10:24 UTC (History)
4 users (show)

See Also:
Host:
Target: powerpc-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-12-04 18:02:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Johnson 2009-12-02 00:42:39 UTC
GCC trunk and 4.4 branch get internal compiler errors when building SPEC CPU2000 test 254.gap with "-O2 -fselective-scheduling -fsel-sched-pipelining" on powerpc-linux, as demonstrated by this minimized testcase:

-----------------------------------------------------------------------
typedef struct TypHeader
{
  unsigned long size;
  struct TypHeader **ptr;
} *TypHandle;

extern TypHandle NewBag (unsigned int type, unsigned long size);
typedef unsigned long TypPoint32;

TypHandle
QuoPP (TypHandle hdL, TypHandle hdR)
{
  TypHandle hdC;
  unsigned long degC;
  TypPoint32 *ptC;
  unsigned long degL;
  TypPoint32 *ptL;
  unsigned long degR;
  TypPoint32 *ptR;
  unsigned long p;

  degL = ((hdL)->size) / sizeof (TypPoint32);
  degR = ((hdR)->size) / sizeof (TypPoint32);
  degC = degL < degR ? degR : degL;
  hdC = NewBag (9, (unsigned long) (degC * sizeof (TypPoint32)));
  ptC = (TypPoint32 *) ((TypHandle *) ((hdC)->ptr));

  for (p = 0; p < degC; p++)
    ptC[(((p) < (degR)) ? (ptR)[(p)] : (p))] =
      ((((((p) < (degL)) ? (ptL)[(p)] : (p))) <
        (degR)) ? (ptR)[((((p) < (degL)) ? (ptL)[(p)] : (p)))]
       : ((((p) < (degL)) ? (ptL)[(p)] : (p))));
}
-----------------------------------------------------------------------

Trunk:

elm3b149% /home/janis/tools/gcc-trunk-anonsvn/bin/gcc -O2 -fselective-scheduling -fsel-sched-pipelining -c bug.c
bug.c: In function ‘QuoPP’:
bug.c:33:1: error: unrecognizable insn:
(insn 176 57 98 11 bug.c:31 (set (reg:CCUNS 199)
        (reg:CCUNS 200)) -1 (nil))
bug.c:33:1: internal compiler error: in extract_insn, at recog.c:2097
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

4.4 branch:

elm3b149% /home/janis/tools/gcc-4.4-anonsvn/bin/gcc -O2 -fselective-scheduling -fsel-sched-pipelining -c bug.c
bug.c: In function ‘QuoPP’:
bug.c:33: error: unrecognizable insn:
(insn 167 91 89 13 bug.c:31 (set (reg:CCUNS 179)
        (reg:CCUNS 180)) -1 (nil))
bug.c:33: internal compiler error: in get_attr_type, at config/rs6000/rs6000.md:13160
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrey Belevantsev 2010-01-14 10:24:29 UTC
This is fixed by http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42294#c8, there was a typo in the bug number so the email didn't get in this audit trail.