https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85674

            Bug ID: 85674
           Summary: ICE insn_min_length, at config/rs6000/rs6000.md:6661
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: powerpc-*-linux-gnu

gcc-9.0.0-alpha20180429 snapshot (r259749) ICEs when compiling the following
snippet w/ -mcpu=e300c3 (=e300c2) -misel -O1 -fcrossjumping -frename-registers
-fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -fsplit-paths
-fstrict-aliasing -ftrapv -ftree-vrp -fno-move-loop-invariants
-fno-reorder-blocks -fno-tree-ccp --param max-jump-thread-duplication-stmts=30
--param selsched-max-lookahead=19:

signed char v9;
short int hw;
long long int k1;

void
d2 (void)
{
  short int *z4 = &k1;
  unsigned short int *ur = hw;
  unsigned short int gx = *z4 == (z4 = ur);

  hw /= 3;
  k1 += hw;

  for (hw = 1; hw < 4; ++hw)
    {
      unsigned short int nk;
      unsigned int xx;
      int mj;
      int ys;

      nk = gx | -2;
      nk = nk > !!hw;
      xx = !!gx ? gx : 0x10000;
      mj = nk * xx;
      ys = *z4 * gx * 2;
      gx += ys <= *z4;
      v9 += mj / gx;
    }

  for (;;)
    {
    }
}

% powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20180429 -mcpu=e300c3 -misel -O1
-fcrossjumping -frename-registers -fschedule-insns2 -fsel-sched-pipelining
-fselective-scheduling2 -fsplit-paths -fstrict-aliasing -ftrapv -ftree-vrp
-fno-move-loop-invariants -fno-reorder-blocks -fno-tree-ccp --param
max-jump-thread-duplication-stmts=30 --param selsched-max-lookahead=19 -w -c
i8eydx17.c
i8eydx17.c: In function 'd2':
i8eydx17.c:34:1: error: unrecognizable insn:
 }
 ^
(insn 211 72 61 (set (reg:CCUNS 73 5 [199])
        (reg:CCUNS 69 1 [227])) "i8eydx17.c":25 -1
     (nil))
during RTL pass: shorten
i8eydx17.c:34:1: internal compiler error: in insn_min_length, at
config/rs6000/rs6000.md:6661
0x556184 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/rtl-error.c:108
0x5561c4 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/rtl-error.c:116
0x120cfdd insn_min_length(rtx_insn*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/config/rs6000/rs6000.md:6661
0x896b4d shorten_branches(rtx_insn*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/final.c:1190
0x8970a2 rest_of_handle_shorten_branches
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/final.c:4764
0x8970a2 execute
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/final.c:4793

Reply via email to