[Bug tree-optimization/126865] New: [17 Regression] ICE at -O2 -march=rv64gcv on riscv64 during GIMPLE pass: slp

xxs_chy at outlook dot com via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126865

            Bug ID: 126865
           Summary: [17 Regression] ICE at -O2 -march=rv64gcv on riscv64
                    during GIMPLE pass: slp
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xxs_chy at outlook dot com
  Target Milestone: ---

Reproducer: https://godbolt.org/z/53r7fsvz3
Reduced case:
#include <stdint.h>
#include <stdlib.h>
uint16_t g2, g24, g11;
_Bool g28_c11;
uint16_t g28()
{
    g24 = 10690 / (int16_t)g2;
    if (g28_c11) g11 = (int16_t)g28 / 9 + g24;
    abort();
}

Dump at -O2 -march=rv64gcv:
during GIMPLE pass: slp
/tmp/tmpgfrw473r/case.c: In function 'f29.constprop':
/tmp/tmpgfrw473r/case.c:10801:45: internal compiler error: in
vect_schedule_slp_node, at tree-vect-slp.cc:12260
10801 | static inline __attribute__((cold)) uint8_t f29(uint8_t a0, _Bool a1,
fp_t_3 a2, uint32_t a3, _Bool a4, uint32_t a5) {
      |                                             ^~~
0x3455d0d internal_error(char const*, ...)
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/diagnostic-global-context.cc:787
0xf1dc33 fancy_abort(char const*, int, char const*)
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/diagnostics/context.cc:1813
0xe09330 vect_schedule_slp_node
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:12260
0x1ac52c8 vect_schedule_scc
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:12640
0x1ac524b vect_schedule_scc
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:12620
0x1ac5940 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>&,
bool)
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:12796
0x1ac76d9 vect_slp_analyze_bb_1
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:10404
0x1ac76d9 vect_slp_region
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:10457
0x1ac76d9 vect_slp_bbs
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:10680
0x1aca311 vect_slp_function(function*)
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vect-slp.cc:10802
0x1ad5f15 execute
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/tree-vectorizer.cc:1573
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.