https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108314
Bug ID: 108314
Summary: [13 Regression] Segfault in
gimple-match-head.cc:do_valueize when vectorizing for
SVE
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: acoplan at gcc dot gnu.org
Target Milestone: ---
The following appears to be a regression on the trunk:
$ cat t.c
int x, y, z;
void f(void) {
int t = 4;
for (; x; x++) {
if (y)
continue;
t = 0;
}
z = t;
}
$ aarch64-none-elf-gcc -c t.c -O2 -march=armv9-a
during GIMPLE pass: vect
t.c: In function 'f':
t.c:2:6: internal compiler error: Segmentation fault
2 | void f(void) {
| ^
0xed3a4f crash_signal
/home/alecop01/toolchain/src/gcc/gcc/toplev.cc:314
0x17255c4 do_valueize
/home/alecop01/toolchain/src/gcc/gcc/gimple-match-head.cc:845
0x17255c4 operator()
/home/alecop01/toolchain/src/gcc/gcc/gimple-match-head.cc:1071
0x17255c4 gimple_extract<gimple_simplify(gimple*, gimple_match_op*, gimple**,
tree_node* (*)(tree), tree_node* (*)(tree))::<lambda(tree)>,
gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node* (*)(tree),
tree_node* (*)(tree))::<lambda(tree)> >
/home/alecop01/toolchain/src/gcc/gcc/gimple-match-head.cc:1028
0x17255c4 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
/home/alecop01/toolchain/src/gcc/gcc/gimple-match-head.cc:1103
0xb239b6 gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*),
tree_node* (*)(tree_node*))
/home/alecop01/toolchain/src/gcc/gcc/gimple-fold.cc:7441
0x113d196 visit_stmt
/home/alecop01/toolchain/src/gcc/gcc/tree-ssa-sccvn.cc:6134
0x113dcee process_bb
/home/alecop01/toolchain/src/gcc/gcc/tree-ssa-sccvn.cc:7844
0x1140b4d do_rpo_vn_1
/home/alecop01/toolchain/src/gcc/gcc/tree-ssa-sccvn.cc:8443
0x114127c do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool,
vn_lookup_kind)
/home/alecop01/toolchain/src/gcc/gcc/tree-ssa-sccvn.cc:8545
0x123c0ce execute
/home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.cc:1388
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.