From: rsandifo Date: Tue, 29 Oct 2019 10:41:45 +0000 (+0000) Subject: Fix reduc_index calculation in vectorizable_condition X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=736b509a58339bc4eaf9305c2edf28282823ad53;p=thirdparty%2Fgcc.git Fix reduc_index calculation in vectorizable_condition Fixes ICEs in gcc.target/aarch64/sve/clastb*. 2019-10-29 Richard Sandiford gcc/ * tree-vect-stmts.c (vectorizable_condition): Get the reduction index for the COND_EXPR from stmt_info rather than reduc_info. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277567 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77c8b185c6da..1c429520386e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-29 Richard Sandiford + + * tree-vect-stmts.c (vectorizable_condition): Get the reduction + index for the COND_EXPR from stmt_info rather than reduc_info. + 2019-10-29 Richard Biener PR tree-optimization/65930 diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index abc827f738ee..7f5228208a03 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -9882,7 +9882,7 @@ vectorizable_condition (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, return false; reduc_info = info_for_reduction (stmt_info); reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); - reduc_index = STMT_VINFO_REDUC_IDX (reduc_info); + reduc_index = STMT_VINFO_REDUC_IDX (stmt_info); gcc_assert (reduction_type != EXTRACT_LAST_REDUCTION || reduc_index != -1); }