This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, tree-optimization]: Fix PR 35085, gcc.dg/vect/vect-iv-9.c fails


Hello!

As explained in the PR, sometimes we enter rewrite_expr_tree with
operands in the "wrong" order to detect reduction sum opportunity:

(working):
+++ OP1: D.2002_7
op1 rank: 327681
->not phi for stmt
+++ OP2: i_18
op2 rank: 327680
not phi for stmt
+++ OP3: s_17
op3 rank: 327680
 phi for stmt

(failed):
+++ OP1: D.2020_7
op1 rank: 327681
->not phi for stmt
+++ OP2: s_18
op2 rank: 327680
 phi for stmt
+++ OP3: i_17
op3 rank: 327680
not phi for stmt

Following the logic in reduction detection on op3, we simply try the
detection and processing on op2.

The patch was bootstrapped and regression tested on i686-pc-linux-gnu.
The patch reportedly fix the failure.

2008-02-07  Uros Bizjak  <ubizjak@gmail.com>

	PR tree-optimization/35085
	* tree-ssa-reassoc.c (rewrite_expr_tree): Enable destructive update
	for operand entry oe2 in addition to operand entry oe3 in order to
	expose more opportunities for vectorizer sum reduction.

OK for mainline?

Uros.

Attachment: p.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]