2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46928
* tree-data-ref.c (analyze_overlapping_iterations): Handle "A[p] == A[p]"
in data dependence analysis with p a parameter of the loop.
* gcc.dg/tree-ssa/ldist-17.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167843
138bc75d-0d04-0410-961f-
82ee72b054a4
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
+ PR tree-optimization/46928
+ * tree-data-ref.c (analyze_overlapping_iterations): Handle "A[p] == A[p]"
+ in data dependence analysis with p a parameter of the loop.
+
+2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
+
PR tree-optimization/45948
* tree-loop-distribution.c (ssa_name_has_uses_outside_loop_p): New.
(stmt_has_scalar_dependences_outside_loop): New.
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
+ PR tree-optimization/46928
+ * gcc.dg/tree-ssa/ldist-17.c: New.
+
+2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
+
PR tree-optimization/45948
* gcc.dg/tree-ssa/ldist-pr45948.c: New.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */
+
+typedef int mad_fixed_t;
+struct mad_pcm
+{
+ unsigned int samplerate;
+ unsigned short channels;
+ unsigned short length;
+ mad_fixed_t samples[2][1152];
+};
+struct mad_synth
+{
+ mad_fixed_t filter[2][2][2][16][8];
+ unsigned int phase;
+ struct mad_pcm pcm;
+};
+void mad_synth_mute (struct mad_synth *synth);
+void
+mad_synth_mute (struct mad_synth *synth)
+{
+ unsigned int ch;
+ unsigned int s;
+ unsigned int v;
+
+ ch = 0U;
+ while (ch < 2U)
+ {
+ s = 0U;
+ while (s < 16U)
+ {
+ v = 0U;
+ while (v < 8U)
+ {
+ synth->filter[ch][1][1][s][v] = 0;
+ synth->filter[ch][1][0][s][v] = 0;
+ synth->filter[ch][0][1][s][v] = 0;
+ synth->filter[ch][0][0][s][v] = 0;
+ v++;
+ }
+ s++;
+ }
+ ch++;
+ }
+ return;
+}
+
+/* { dg-final { scan-tree-dump "distributed: split to 4" "ldist" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_memset" 8 "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
/* If they are the same chrec, and are affine, they overlap
on every iteration. */
else if (eq_evolutions_p (chrec_a, chrec_b)
- && evolution_function_is_affine_multivariate_p (chrec_a, lnn))
+ && (evolution_function_is_affine_multivariate_p (chrec_a, lnn)
+ || operand_equal_p (chrec_a, chrec_b, 0)))
{
dependence_stats.num_same_subscript_function++;
*overlap_iterations_a = conflict_fn (1, affine_fn_cst (integer_zero_node));
}
/* If they aren't the same, and aren't affine, we can't do anything
- yet. */
+ yet. */
else if ((chrec_contains_symbols (chrec_a)
|| chrec_contains_symbols (chrec_b))
&& (!evolution_function_is_affine_multivariate_p (chrec_a, lnn)