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

            Bug ID: 90722
           Summary: ICE with __builtin_convertvector with
                    -msve-vector-bits=256
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: prathamesh3492 at gcc dot gnu.org
  Target Milestone: ---

The following test-case:

typedef int v4si __attribute__((vector_size (4 * sizeof (int))));
typedef double v4df __attribute__((vector_size (4 * sizeof (double))));

void
f4 (v4df *x, v4si *y)
{
  *y = __builtin_convertvector (*x, v4si);
}

results in ICE with -O2 -march=armv8.2-a+sve -msve-vector-bits=256:

0xcddacd simplify_const_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
        ../../gcc/gcc/simplify-rtx.c:1763
0xcd9c2a simplify_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
        ../../gcc/gcc/simplify-rtx.c:873
0x13bca5a combine_simplify_rtx
        ../../gcc/gcc/combine.c:5787
0x13bf1a6 subst
        ../../gcc/gcc/combine.c:5727
0x13bf2bb subst
        ../../gcc/gcc/combine.c:5590
0x13bf102 subst
        ../../gcc/gcc/combine.c:5661
0x13c0568 try_combine
        ../../gcc/gcc/combine.c:3420
0x13c66c6 combine_instructions
        ../../gcc/gcc/combine.c:1306
0x13c66c6 rest_of_handle_combine
        ../../gcc/gcc/combine.c:15068
0x13c66c6 execute
        ../../gcc/gcc/combine.c:15113

because it hits following assert in simplify_const_unary_operation:
    gcc_assert (known_eq (GET_MODE_NUNITS (mode), n_elts));

GET_MODE_NUNITS (mode) == 8 and n_elts == 4 for the test-case.

Thanks,
Prathamesh

Reply via email to