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

            Bug ID: 97579
           Summary: [11 Regression] ICE in gimple_expand_vec_cond_expr, at
                    gimple-isel.cc:201 since r11-4123-g128f43cf679e5156
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

The issue was probably latent:

$ cat meteor.c
int bad_odd_rows_0_0, rows_bad_row1, rows_bad_group_okay, calc_rows_row2;

int
rows_bad() {
  int i, in_zeroes;
  char block;
  i = 0;
  for (; i < 5; i++)
    if (rows_bad_row1 & i)
      in_zeroes = 0;
    else {
      if (!in_zeroes)
        in_zeroes = 1;
      if (block & 1)
        rows_bad_group_okay = 1;
    }
  if (in_zeroes)
    return rows_bad_group_okay;
}

void
calc_rows() {
  for (; calc_rows_row2; calc_rows_row2++) {
    rows_bad();
    bad_odd_rows_0_0 = rows_bad();
  }
}

$ gcc meteor.c --param=max-unswitch-insns=1024 -O3 -mavx512vl -c
during GIMPLE pass: isel
meteor.c: In function ‘calc_rows’:
meteor.c:22:1: internal compiler error: in gimple_expand_vec_cond_expr, at
gimple-isel.cc:201
   22 | calc_rows() {
      | ^~~~~~~~~
0x72d8f5 gimple_expand_vec_cond_expr
        /home/marxin/Programming/gcc/gcc/gimple-isel.cc:201
0xff19d0 gimple_expand_vec_exprs
        /home/marxin/Programming/gcc/gcc/gimple-isel.cc:247
0xff19d0 execute
        /home/marxin/Programming/gcc/gcc/gimple-isel.cc:300
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

The problematic statement is:

(gdb) p debug_gimple_stmt(stmt)
mask__581.198_1001 = VEC_COND_EXPR <mask__258.180_254, { 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 }, mask__649.184_117>;

(gdb) p mode
$3 = E_HImode
(gdb) p cmp_op_mode
$4 = E_V16SImode

Reply via email to