+2012-06-20 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline
+ 2010-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46985
+ * tree-scalar-evolution.c (instantiate_scev_r): If chrec is NULL,
+ return it immediately.
+
+ 2011-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/47780
+ * cfgexpand.c (expand_debug_expr) <case SSA_NAME>: Call copy_rtx to
+ avoid invalid rtx sharing.
+
+ 2011-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/47903
+ * real.c (real_arithmetic) <case PLUS_EXPR, MINUS_EXPR,
+ MULT_EXPR, RDIV_EXPR>: Clear padding bits in *r first if
+ r isn't op0 nor op1.
+
2012-06-04 Edmar Wienskoski <edmar@freescale.com>
* config/rs6000/altivec.md (altivec_stvlx): Change machine mode of
gcc_assert (part >= 0 && (unsigned)part < SA.map->num_partitions);
- op0 = SA.partition_to_pseudo[part];
+ op0 = copy_rtx (SA.partition_to_pseudo[part]);
}
goto adjust_mode;
}
switch (code)
{
case PLUS_EXPR:
+ /* Clear any padding areas in *r if it isn't equal to one of the
+ operands so that we can later do bitwise comparisons later on. */
+ if (r != op0 && r != op1)
+ memset (r, '\0', sizeof (*r));
return do_add (r, op0, op1, 0);
case MINUS_EXPR:
+ if (r != op0 && r != op1)
+ memset (r, '\0', sizeof (*r));
return do_add (r, op0, op1, 1);
case MULT_EXPR:
+ if (r != op0 && r != op1)
+ memset (r, '\0', sizeof (*r));
return do_multiply (r, op0, op1);
case RDIV_EXPR:
+ if (r != op0 && r != op1)
+ memset (r, '\0', sizeof (*r));
return do_divide (r, op0, op1);
case MIN_EXPR:
+2012-06-20 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline
+ 2010-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46985
+ * gfortran.dg/pr46985.f90: New test.
+
+ 2011-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/47780
+ * gcc.target/i386/pr47780.c: New test.
+
2012-06-04 Edmar Wienskoski <edmar@freescale.com>
* gcc.target/powerpc/cell_builtin_1.c: New test case.
--- /dev/null
+/* PR debug/47780 */
+/* { dg-do compile } */
+/* { dg-options "-O -fgcse -fgcse-las -fstack-protector-all -fno-tree-ccp -fno-tree-dominator-opts -fcompare-debug -Wno-psabi" } */
+
+typedef int V2SF __attribute__ ((vector_size (128)));
+
+V2SF
+foo (int x, V2SF a)
+{
+ V2SF b = a + (V2SF) {};
+ while (x--)
+ a += b;
+ return a;
+}
--- /dev/null
+! PR tree-optimization/46985
+! { dg-do compile }
+! { dg-options "-O -ftree-pre -ftree-vrp -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-fre" }
+
+ type :: t
+ integer :: i
+ end type t
+ type(t), target :: tar(2) = (/t(2), t(4)/)
+ integer, pointer :: ptr(:)
+ ptr => tar%i
+ call foo (ptr)
+contains
+ subroutine foo (arg)
+ integer :: arg(:)
+ arg = arg - 1
+ end subroutine
+end
if (size_expr++ > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
return chrec_dont_know;
- if (automatically_generated_chrec_p (chrec)
+ if (chrec == NULL_TREE
+ || automatically_generated_chrec_p (chrec)
|| is_gimple_min_invariant (chrec))
return chrec;