diff options
author | Michael Matz <matz@gcc.gnu.org> | 2010-01-19 16:05:57 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2010-01-19 16:05:57 +0000 |
commit | b61b1f1708ed5114bc753e54b4d3b3b92d99649c (patch) | |
tree | 8b75ec9a7cd6dfed1c0f14f1e6f59e465852c3c6 /gcc/tree-vect-data-refs.c | |
parent | b3d7e1910fd9146716cc75a562bd59327c79ee58 (diff) | |
download | gcc-b61b1f1708ed5114bc753e54b4d3b3b92d99649c.zip gcc-b61b1f1708ed5114bc753e54b4d3b3b92d99649c.tar.gz gcc-b61b1f1708ed5114bc753e54b4d3b3b92d99649c.tar.bz2 |
re PR tree-optimization/41783 (r151561 (PRE fix) regresses zeusmp)
PR tree-optimization/41783
* tree-data-ref.c (toplevel): Include flags.h.
(dump_data_dependence_relation): Also dump the inputs if the
result will be unknown.
(split_constant_offset_1): Look through some conversions.
* tree-predcom.c (determine_roots_comp): Restart a new chain if
the offset from last element is too large.
(ref_at_iteration): Deal also with MISALIGNED_INDIRECT_REF.
(reassociate_to_the_same_stmt): Handle vector registers.
* tree-vect-data-refs.c (vect_equal_offsets): Handle unary operations
(e.g. conversions).
* tree-vect-loop-manip.c (vect_gen_niters_for_prolog_loop): Add
wide_prolog_niters argument, emit widening instructions.
(vect_do_peeling_for_alignment): Adjust caller, use widened
variant of the iteration cound.
* Makefile.in (tree-data-ref.o): Add $(FLAGS_H).
testsuite/
* gfortran.dg/vect/fast-math-mgrid-resid.f: New.
From-SVN: r156043
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 8991853..37ae9b5 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -294,7 +294,7 @@ vect_update_interleaving_chain (struct data_reference *drb, static bool vect_equal_offsets (tree offset1, tree offset2) { - bool res0, res1; + bool res; STRIP_NOPS (offset1); STRIP_NOPS (offset2); @@ -303,16 +303,19 @@ vect_equal_offsets (tree offset1, tree offset2) return true; if (TREE_CODE (offset1) != TREE_CODE (offset2) - || !BINARY_CLASS_P (offset1) - || !BINARY_CLASS_P (offset2)) + || (!BINARY_CLASS_P (offset1) && !UNARY_CLASS_P (offset1))) return false; - res0 = vect_equal_offsets (TREE_OPERAND (offset1, 0), - TREE_OPERAND (offset2, 0)); - res1 = vect_equal_offsets (TREE_OPERAND (offset1, 1), - TREE_OPERAND (offset2, 1)); + res = vect_equal_offsets (TREE_OPERAND (offset1, 0), + TREE_OPERAND (offset2, 0)); - return (res0 && res1); + if (!res || !BINARY_CLASS_P (offset1)) + return res; + + res = vect_equal_offsets (TREE_OPERAND (offset1, 1), + TREE_OPERAND (offset2, 1)); + + return res; } |