aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorMichael Matz <matz@gcc.gnu.org>2010-01-19 16:05:57 +0000
committerMichael Matz <matz@gcc.gnu.org>2010-01-19 16:05:57 +0000
commitb61b1f1708ed5114bc753e54b4d3b3b92d99649c (patch)
tree8b75ec9a7cd6dfed1c0f14f1e6f59e465852c3c6 /gcc/tree-data-ref.c
parentb3d7e1910fd9146716cc75a562bd59327c79ee58 (diff)
downloadgcc-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-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index dbdd323..9f5a623 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -79,6 +79,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "ggc.h"
+#include "flags.h"
#include "tree.h"
/* These RTL headers are needed for basic-block.h. */
@@ -380,6 +381,19 @@ dump_data_dependence_relation (FILE *outf,
if (!ddr || DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
{
+ if (ddr)
+ {
+ dra = DDR_A (ddr);
+ drb = DDR_B (ddr);
+ if (dra)
+ dump_data_reference (outf, dra);
+ else
+ fprintf (outf, " (nil)\n");
+ if (drb)
+ dump_data_reference (outf, drb);
+ else
+ fprintf (outf, " (nil)\n");
+ }
fprintf (outf, " (don't know)\n)\n");
return;
}
@@ -631,6 +645,24 @@ split_constant_offset_1 (tree type, tree op0, enum tree_code code, tree op1,
return split_constant_offset_1 (type, var0, subcode, var1, var, off);
}
+ CASE_CONVERT:
+ {
+ /* We must not introduce undefined overflow, and we must not change the value.
+ Hence we're okay if the inner type doesn't overflow to start with
+ (pointer or signed), the outer type also is an integer or pointer
+ and the outer precision is at least as large as the inner. */
+ tree itype = TREE_TYPE (op0);
+ if ((POINTER_TYPE_P (itype)
+ || (INTEGRAL_TYPE_P (itype) && TYPE_OVERFLOW_UNDEFINED (itype)))
+ && TYPE_PRECISION (type) >= TYPE_PRECISION (itype)
+ && (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type)))
+ {
+ split_constant_offset (op0, &var0, off);
+ *var = fold_convert (type, var0);
+ return true;
+ }
+ return false;
+ }
default:
return false;