Hi Richard, > On Thu, 19 Sep 2019, Richard Sandiford wrote: > >> Richard Biener <rguent...@suse.de> writes: >> > It shouldn't be neccessary. >> >> SVE is the counter-example :-) But the fix is simpler than the code >> you removed, so it's still a net win. > > Yeah, I meant it shouldn't be necessary to swap operands of the > original scalar stmts since we keep track of the "order" via > reduc_index. > >> Fixes various vect.exp and aarch64-sve.exp ICEs. OK if it passes >> proper testing? > > OK.
I suspect this patch caused +FAIL: gcc.dg/pr88031.c (internal compiler error) +FAIL: gcc.dg/pr88031.c (test for excess errors) I'm seeing it on 32 and 64-bit Solaris/x86, but there are also several reports on aarch64, armv8l, i686, powerpc64*, s390x, x86_64. Excess errors: during GIMPLE pass: vect /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/pr88031.c:6:6: internal compiler error: in vectorizable_reduction, at tree-vect-loop.c:6662 0x938ecdf vectorizable_reduction(_stmt_vec_info*, gimple_stmt_iterator*, _stmt_vec_info**, _slp_tree*, _slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) /vol/gcc/src/hg/trunk/local/gcc/tree-vect-loop.c:6662 0x936ac2a vect_analyze_stmt(_stmt_vec_info*, bool*, _slp_tree*, _slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) /vol/gcc/src/hg/trunk/local/gcc/tree-vect-stmts.c:10667 0x938afce vect_analyze_loop_operations /vol/gcc/src/hg/trunk/local/gcc/tree-vect-loop.c:1580 0x938afce vect_analyze_loop_2 /vol/gcc/src/hg/trunk/local/gcc/tree-vect-loop.c:2026 0x938afce vect_analyze_loop(loop*, _loop_vec_info*, vec_info_shared*) /vol/gcc/src/hg/trunk/local/gcc/tree-vect-loop.c:2329 0x93ab60e try_vectorize_loop_1 /vol/gcc/src/hg/trunk/local/gcc/tree-vectorizer.c:884 0x93abd6c try_vectorize_loop /vol/gcc/src/hg/trunk/local/gcc/tree-vectorizer.c:1030 0x93ac2fb vectorize_loops() /vol/gcc/src/hg/trunk/local/gcc/tree-vectorizer.c:1104 Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University