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

            Bug ID: 125818
           Summary: ICE with SVE intrinsics in
                    aarch64_gimple_fold_builtin: expected ssa_name, have
                    mem_ref
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails going all the way back to GCC 10 (when the SVE ACLE was
introduced):

$ cat t.c
#pragma GCC aarch64 "arm_sve.h"
void f(svfloat32x2_t *tp, const svfloat32x2_t *tuple, const svfloat32_t *vp) {
  *tp = svset2_f32(*tuple, 0, *vp);
}
$ ./xgcc -B . -c t.c -S -o /dev/null -O2 -march=armv8.2-a+sve
during GIMPLE pass: lower
t.c: In function ‘f’:
t.c:2:6: internal compiler error: tree check: expected ssa_name, have mem_ref
in completely_unused, at gimple-iterator.cc:42
    2 | void f(svfloat32x2_t *tp, const svfloat32x2_t *tuple, const svfloat32_t
*vp) {
      |      ^
0x3b89b9a internal_error(char const*, ...)
        /fast/trunk/src/gcc/gcc/diagnostic-global-context.cc:787
0x2038784 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        /fast/trunk/src/gcc/gcc/tree.cc:9219
0x1049ab3 tree_check(tree_node const*, char const*, int, char const*,
tree_code)
        /fast/trunk/src/gcc/gcc/tree.h:4080
0x15dbb6f completely_unused
        /fast/trunk/src/gcc/gcc/gimple-iterator.cc:42
0x15dc68e gsi_replace(gimple_stmt_iterator*, gimple*, bool)
        /fast/trunk/src/gcc/gcc/gimple-iterator.cc:449
0x2149bff aarch64_gimple_fold_builtin
        /fast/trunk/src/gcc/gcc/config/aarch64/aarch64.cc:16852
0x15f56d3 gimple_fold_call
        /fast/trunk/src/gcc/gcc/gimple-fold.cc:6143
0x15f947c fold_stmt_1
        /fast/trunk/src/gcc/gcc/gimple-fold.cc:6985
0x15f96e7 fold_stmt(gimple_stmt_iterator*, bitmap_head*)
        /fast/trunk/src/gcc/gcc/gimple-fold.cc:7065
0x376e019 lower_stmt
        /fast/trunk/src/gcc/gcc/gimple-low.cc:874
0x376bb55 lower_sequence
        /fast/trunk/src/gcc/gcc/gimple-low.cc:266
0x376e4bf lower_gimple_bind
        /fast/trunk/src/gcc/gcc/gimple-low.cc:963
0x376b6d8 lower_function_body
        /fast/trunk/src/gcc/gcc/gimple-low.cc:147
0x376baba execute
        /fast/trunk/src/gcc/gcc/gimple-low.cc:243
./cc1 -quiet -iprefix
/fast/builds/cc1s/dbg/aarch64/trunk/gcc/../lib/gcc/aarch64-linux-gnu/17.0.0/
-isystem ./include -isystem ./include-fixed t.c -mno-fix-cortex-a53-835769
-mno-fix-cortex-a53-843419 -quiet -dumpbase t.c -dumpbase-ext .c
-march=armv8.2-a+sve -mlittle-endian -mabi=lp64 -O2 -o /dev/null
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to