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

            Bug ID: 111234
           Summary: RISC-V: ICE in vsetvl pass
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lehua.ding at rivai dot ai
  Target Milestone: ---

For this code, there is an internal compiler error.

#include <riscv_vector.h>

vint64m2_t f (vint32m1_t *a, int b, vbool32_t m)
{
  vint32m1_t va = *a;
  vint64m2_t vb = __riscv_vwadd_vx_i64m2 (va, 1, __riscv_vsetvlmax_e64m2 ());
  vint64m2_t vc = __riscv_vadd_vx_i64m2 (vb, 1, __riscv_vsetvlmax_e64m2 ());

  if (b != 0)
    vc = __riscv_vadd_vx_i64m2_mu (m, vc, vc, 1, __riscv_vsetvlmax_e64m2 ());

  return vc;
}

online reproduce URL: https://godbolt.org/z/j5ToxWYc8

Reply via email to