Bug 106886 - [13 Regression] ICE in vect_schedule_slp_node since r13-2348-gd2694766dcfff027
Summary: [13 Regression] ICE in vect_schedule_slp_node since r13-2348-gd2694766dcfff027
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 13.0
: P3 normal
Target Milestone: 13.0
Assignee: Richard Sandiford
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-08 05:41 UTC by David Binderman
Modified: 2022-09-08 15:20 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2022-09-08 00:00:00


Attachments
C source code (93.96 KB, text/x-csrc)
2022-09-08 05:41 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2022-09-08 05:41:17 UTC
Created attachment 53547 [details]
C source code

Recent gcc:

$ ../results/bin/gcc -c -O2 -march=bdver2 bug844.c
during GIMPLE pass: slp
rl2auxgeom.c: In function ‘rl2_set_coord_seq_value’:
rl2auxgeom.c:3980:1: internal compiler error: Segmentation fault
0xd67469 crash_signal(int)
	../../trunk.git/gcc/toplev.cc:314
0x103b8f2 vect_schedule_slp_node(vec_info*, _slp_tree*, _slp_instance*)
	../../trunk.git/gcc/vec.h:0
0x102f33f vect_schedule_scc(vec_info*, _slp_tree*, _slp_instance*, hash_map<_slp_tree*, slp_scc_info, simple_hashmap_traits<default_hash_traits<_slp_tree*>, slp_scc_info> >&, int&, vec<_slp_tree*, va_heap, vl_ptr>&)
	../../trunk.git/gcc/tree-vect-slp.cc:9096
0x102f05c vect_schedule_scc(vec_info*, _slp_tree*, _slp_instance*, hash_map<_slp_tree*, slp_scc_info, simple_hashmap_traits<default_hash_traits<_slp_tree*>, slp_scc_info> >&, int&, vec<_slp_tree*, va_heap, vl_ptr>&)
	../../trunk.git/gcc/tree-vect-slp.cc:9077

I will have my usual go at finding a git range and doing a reduction.
Comment 1 David Binderman 2022-09-08 05:50:04 UTC
Git range seems to be 2985049049f12b0a..0b0a3cdbff64d97e, from near the start of the month.

There are 29 commits in that range.
Comment 2 David Binderman 2022-09-08 06:09:10 UTC
Reduced C code seems to be:

rl2GeomExport64_little_endian, rl2GeomExport64_little_endian_arch;
rl2GeomExport64(unsigned char *p, double value) {
  union {
    unsigned char byte[8];
    double double_value
  } convert;
  convert.double_value = value;
  if (rl2GeomExport64_little_endian_arch)
    if (rl2GeomExport64_little_endian) {
      *(p + 7) = convert.byte[0];
      *(p + 6) = convert.byte[1];
      *(p + 5) = convert.byte[2];
      *(p + 4) = convert.byte[3];
      *(p + 3) = convert.byte[4];
      *(p + 2) = convert.byte[5];
      *(p + 1) = convert.byte[6];
      *p = convert.byte[7];
    } else
      *p = convert.byte[7];
}
Comment 3 Martin Liška 2022-09-08 09:47:51 UTC
Started with r13-2348-gd2694766dcfff027.
Comment 4 Richard Sandiford 2022-09-08 11:48:59 UTC
Oops, looks like a silly typo.  Testing a patch.
Comment 5 GCC Commits 2022-09-08 15:18:43 UTC
The trunk branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:338a5b0d7da84ef1f6c01dd96abf2c6bc830f403

commit r13-2544-g338a5b0d7da84ef1f6c01dd96abf2c6bc830f403
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Sep 8 16:18:28 2022 +0100

    vect: Fix scalar stmt typo in vect_optimize_slp_pass [PR106886]
    
    Fix a stupid typo in my vect_optimize_slp_pass patch.
    
    gcc/
            PR tree-optimization/106886
            * tree-vect-slp.cc (vect_optimize_slp_pass::get_result_with_layout):
            Fix copying of scalar stmts.
    
    gcc/testsuite/
            PR tree-optimization/106886
            * gcc.dg/vect/bb-slp-layout-21.c: New test.
Comment 6 Richard Sandiford 2022-09-08 15:20:12 UTC
Fixed.