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

            Bug ID: 101636
           Summary: [11/12 Regression] ICE: verify_gimple failed (error:
                    conversion of register to a different size in
                    'view_convert_expr')
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

gcc-12.0.0-alpha20210725 snapshot (g:b454c40956947938c9e274d75cef8a43171f3efa)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.dg/vect/slp-cond-5.c, w/ -mavx512f -O1 -ftree-vectorize:

inline int
foo (int y, int a)
{
  return (y && a) ? a : 0;
}

void
bar (int *__restrict a, int *__restrict d, int *__restrict e, int i)
{
  while (i < 1)
    {
      e[8] = e[7] = e[6] = e[5] = e[4] = e[3] = e[2] = e[1] = e[0]
        = foo (d[8], a[8]);
      e[9] = foo (d[9], a[9]);
      e[10] = foo (d[0], a[0]);
      e[11] = foo (d[1], a[1]);
      e[12] = foo (d[12], a[12]);
      e[13] = foo (d[13], a[13]);
      e[14] = foo (d[4], a[4]);
      e[15] = foo (d[15], a[15]);

      a += 16;
      e += 1;
      i += 1;
    }
}

% x86_64-pc-linux-gnu-gcc-12.0.0 -mavx512f -O1 -ftree-vectorize -c uo7arifc.c
uo7arifc.c: In function 'bar':
uo7arifc.c:8:1: error: conversion of register to a different size in
'view_convert_expr'
    8 | bar (int *__restrict a, int *__restrict d, int *__restrict e, int i)
      | ^~~
VIEW_CONVERT_EXPR<vector(16) <signed-boolean:1>>(vect_patt_173.38_215);

_151 = VIEW_CONVERT_EXPR<vector(16) <signed-boolean:1>>(vect_patt_173.38_215);
during GIMPLE pass: slp
uo7arifc.c:8:1: internal compiler error: verify_gimple failed
0xe8a12a verify_gimple_in_cfg(function*, bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210725/work/gcc-12-20210725/gcc/tree-cfg.c:5536
0xd5934f execute_function_todo
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210725/work/gcc-12-20210725/gcc/passes.c:2042
0xd59d5b execute_todo
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210725/work/gcc-12-20210725/gcc/passes.c:2096

Reply via email to