https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89570
Bug ID: 89570
Summary: [9 Regression] ICE in prepare_cmp_insn, at
optabs.c:4001
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
Target: powerpc-*-linux-gnu*
gcc-9.0.0-alpha20190224 snapshot (r269177) ICEs when compiling the following
testcase w/ -mvsx -O1 -ftree-vectorize -fno-trapping-math -fno-tree-dce
-fno-tree-dominator-opts:
void
e6 (double *xt, double *w4, double *mg)
{
int tj;
for (tj = 0; tj < 7; tj += 2)
{
xt[tj] = w4[tj] ? mg[tj] / 2.0 : mg[tj];
xt[tj + 1] = w4[tj + 1] ? mg[tj + 1] / 2.0 : mg[tj + 1];
}
}
% powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20190224 -mvsx -O1 -ftree-vectorize
-fno-trapping-math -fno-tree-dce -fno-tree-dominator-opts -c v3agviey.c
during RTL pass: expand
v3agviey.c: In function 'e6':
v3agviey.c:2:1: internal compiler error: in prepare_cmp_insn, at optabs.c:4001
2 | e6 (double *xt, double *w4, double *mg)
| ^~
0x62fab1 prepare_cmp_insn
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/optabs.c:4001
0xc15be6 emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*,
machine_mode, int, rtx_def*, profile_probability)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/optabs.c:4146
0x939dfc do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int,
machine_mode, rtx_def*, rtx_code_label*, rtx_code_label*, profile_probability)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/dojump.c:1171
0x93babd do_compare_and_jump
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/dojump.c:1245
0x93d1f4 do_jump_1
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/dojump.c:198
0x9ead1d expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/expr.c:9413
0x8bd6f8 expand_gimple_stmt_1
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/cfgexpand.c:3789
0x8bd6f8 expand_gimple_stmt
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/cfgexpand.c:3850
0x8be227 expand_gimple_basic_block
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/cfgexpand.c:5886
0x8c4427 execute
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190224/work/gcc-9-20190224/gcc/cfgexpand.c:6509