+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59817
+ PR tree-optimization/60453
+ * graphite-scop-detection.c (graphite_can_represent_scev): Complete
+ recursion to catch all CHRECs in the scalar evolution and restrict
+ the predicate for the remains appropriately.
+
2014-04-12 Catherine Moore <clm@codesourcery.com>
* config/mips/constraints.md: Add new register constraint "kb".
switch (TREE_CODE (scev))
{
+ case NEGATE_EXPR:
+ case BIT_NOT_EXPR:
+ CASE_CONVERT:
+ case NON_LVALUE_EXPR:
+ return graphite_can_represent_scev (TREE_OPERAND (scev, 0));
+
case PLUS_EXPR:
+ case POINTER_PLUS_EXPR:
case MINUS_EXPR:
return graphite_can_represent_scev (TREE_OPERAND (scev, 0))
&& graphite_can_represent_scev (TREE_OPERAND (scev, 1));
if (!evolution_function_right_is_integer_cst (scev)
|| !graphite_can_represent_init (scev))
return false;
+ return graphite_can_represent_scev (CHREC_LEFT (scev));
default:
break;
}
/* Only affine functions can be represented. */
- if (!scev_is_linear_expression (scev))
+ if (tree_contains_chrecs (scev, NULL)
+ || !scev_is_linear_expression (scev))
return false;
return true;
+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59817
+ PR tree-optimization/60453
+ * gfortran.dg/graphite/pr59817.f: New testcase.
+ * gcc.dg/graphite/pr59817-1.c: Likewise.
+ * gcc.dg/graphite/pr59817-2.c: Likewise.
+
2014-04-14 Jason Merrill <jason@redhat.com>
Revert:
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -floop-interchange" } */
+
+int kd;
+
+void
+n2(void)
+{
+ static int so;
+ static short int i5;
+ int wj;
+ int *il;
+ int *nk = &so;
+ for (wj = 0; wj < 2; ++wj)
+ *nk = ((i5 += *il) || kd );
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -floop-interchange" } */
+
+void
+xl(void)
+{
+ static int j3;
+ for (j3 = 0; j3 < 1; ++j3) {
+ static int f2;
+ static int w7;
+ short int b5;
+ int ok;
+ f2 = (b5 += ok) ? (w7 = 0): (w7 ? 0 : (f2 = ok));
+ }
+}
--- /dev/null
+! { dg-do compile }
+! { dg-options "-O2 -floop-interchange" }
+ SUBROUTINE PREPD(ICAST,ICAS,ICASX,ICAS1,ICAS2,NDET,NM,III,IMP,
+ * CASMIN)
+ LOGICAL CASMIN
+ DIMENSION ICAST(NDET,NM),IMP(NM)
+ IF(CASMIN) THEN
+ DO K=1,NDET
+ DO L=1,NM
+ IF(L.EQ.K-1) ICAST(K,L) = 1
+ END DO
+ END DO
+ END IF
+ END SUBROUTINE