From 0f78245e5f4a117464626b90a42e896e36161679 Mon Sep 17 00:00:00 2001 From: rguenth Date: Fri, 9 Nov 2018 12:29:51 +0000 Subject: [PATCH] 2018-11-09 Richard Biener PR tree-optimization/87953 * tree-vect-loop.c (vectorizable_reduction): For analysis always pass ops[0] to vectorizable_condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265964 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/tree-vect-loop.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07993c538c0..693ac972e5f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-11-09 Richard Biener + + PR tree-optimization/87953 + * tree-vect-loop.c (vectorizable_reduction): For analysis + always pass ops[0] to vectorizable_condition. + 2018-11-09 Stafford Horne Richard Henderson Joel Sherrill diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 7338ca5efa8..0dc84f1f9e5 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -6485,9 +6485,10 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, if (code == COND_EXPR) { /* Only call during the analysis stage, otherwise we'll lose - STMT_VINFO_TYPE. */ + STMT_VINFO_TYPE. We'll pass ops[0] as reduc_op, it's only + used as a flag during analysis. */ if (!vec_stmt && !vectorizable_condition (stmt_info, gsi, NULL, - ops[reduc_index], 0, NULL, + ops[0], 0, NULL, cost_vec)) { if (dump_enabled_p ()) -- 2.11.4.GIT