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

            Bug ID: 123956
           Summary: ICE during AVL propagation on RISC-V port
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at gcc dot gnu.org
  Target Milestone: ---

Originally reported in pr123870, extracted as a distinct failure and reduced to
a simpler testcase.

Compile with -O2 -march=rv64gc_xtheadvector -mabi=lp64d

Triggers an ICE in AVL propagation.


#pragma riscv intrinsic "vector"
float upsample_row_fbuf[];
int upsample_row_yy, upsample_row_hs, upsample_row_xx, upsample_row_ws;
char upsample_row_mem;
void upsample_row() {
  char *out = &upsample_row_mem + upsample_row_ws;
  for (;;) {
    vfloat32m2_t scale;
    vuint32m2_t sumAA, sumAB;
    vbool16_t mask;
    sumAB = __riscv_vsll_vx_u32m2(sumAB, 4, 8);
    scale = __riscv_vfdiv_vv_f32m2_m(
        mask,
        __riscv_vfcvt_f_x_v_f32m2(__riscv_vreinterpret_v_u32m2_i32m2(sumAB),
8),
        __riscv_vfcvt_f_x_v_f32m2(__riscv_vreinterpret_v_u32m2_i32m2(sumAA),
8),
        8);
    __riscv_vse32_v_f32m2(upsample_row_fbuf, scale, 8);
    for (; upsample_row_yy < upsample_row_hs; upsample_row_yy++)
      for (; upsample_row_xx < upsample_row_ws; upsample_row_xx++)
        out[upsample_row_xx] = 0;
  }
}

Reply via email to