https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87657
Bug ID: 87657 Summary: [9 Regression] SLP ICE in libgfortran matmul_i2_vanilla Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: amonakov at gcc dot gnu.org Target Milestone: --- Target: i?86-*-* Created attachment 44858 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44858&action=edit unreduced testcase 32-bit x86 bootstrap fails at stage3 building libgfortran. On the attached testcase the following command line fails: gcc/cc1 -O2 -fcx-fortran-rules -ffunction-sections -fdata-sections -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 /home/am/gcc-sort/libgfortran/generated/matmul_i2.c: In function ‘matmul_i2_vanilla’: /home/am/gcc-sort/libgfortran/generated/matmul_i2.c:1805:1: internal compiler error: in ix86_builtin_vectorization_cost, at config/i386/i386.c:45176 1805 | matmul_i2_vanilla (gfc_array_i2 * const restrict retarray, | ^~~~~~~~~~~~~~~~~ 0x8ad647b ix86_builtin_vectorization_cost /home/am/gcc-sort/gcc/config/i386/i386.c:45176 0x89b8d71 builtin_vectorization_cost /home/am/gcc-sort/gcc/tree-vectorizer.h:1181 0x89b8d71 record_stmt_cost(vec<stmt_info_for_cost, va_heap, vl_ptr>*, int, vect_cost_for_stmt, _stmt_vec_info*, int, vect_cost_model_location) /home/am/gcc-sort/gcc/tree-vect-stmts.c:106 0x89bb126 vect_prologue_cost_for_slp_op /home/am/gcc-sort/gcc/tree-vect-stmts.c:837 0x89cf3d8 vect_model_store_cost /home/am/gcc-sort/gcc/tree-vect-stmts.c:974 0x89cf3d8 vectorizable_store /home/am/gcc-sort/gcc/tree-vect-stmts.c:6380 0x89d9117 vect_analyze_stmt(_stmt_vec_info*, bool*, _slp_tree*, _slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) /home/am/gcc-sort/gcc/tree-vect-stmts.c:9566 0x8a07188 vect_slp_analyze_node_operations_1 /home/am/gcc-sort/gcc/tree-vect-slp.c:2422 0x8a07188 vect_slp_analyze_node_operations /home/am/gcc-sort/gcc/tree-vect-slp.c:2469 0x8a0a397 vect_slp_analyze_operations(vec_info*) /home/am/gcc-sort/gcc/tree-vect-slp.c:2501 0x8a0b429 vect_slp_analyze_bb_1 /home/am/gcc-sort/gcc/tree-vect-slp.c:2809 0x8a0b429 vect_slp_bb(basic_block_def*) /home/am/gcc-sort/gcc/tree-vect-slp.c:2896 0x8a0bd86 execute /home/am/gcc-sort/gcc/tree-vectorizer.c:1291