===================================================================
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-forwprop1" } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
struct A { int i; };
int
@@ -11,5 +11,7 @@ foo(struct A *locp, int str)
return locp->i;
}
-/* { dg-final { scan-tree-dump "locp.*->i =" "forwprop1" } } */
+/* We should have propagated &locp->i into its dereference. */
+
+/* { dg-final { scan-tree-dump "locp_\[^\\n\]* =" "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
===================================================================
@@ -23,6 +23,5 @@ void foo(double (*q)[4], struct Foo *tmp
}
}
-/* { dg-final { scan-tree-dump "Inserted .* &a" "fre" } } */
-/* { dg-final { scan-tree-dump "Replaced tmp1_.\\\(D\\\)->data" "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced tmp1_.\\\(D\\\)->data with &a" "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -27,6 +27,5 @@ void foo(double (*q)[4])
bar(a);
}
-/* { dg-final { scan-tree-dump "Inserted .* &a" "fre" } } */
-/* { dg-final { scan-tree-dump "Replaced tmp1.data" "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced tmp1.data with &a" "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -11,6 +11,5 @@ int f(int *a)
return *c + t;
}
-/* { dg-final { scan-tree-dump "Replaced \\\(int \\\*\\\) b_.*with a_" "fre" } } */
-/* { dg-final { scan-tree-dump "Replaced \\\*c_.*with t_" "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*a_\[^\n\].*with t_" "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -1,5 +1,5 @@
/* { dg-do "compile" } */
-/* { dg-options "-O2 -fdump-tree-fre" } */
+/* { dg-options "-O2 -fdump-tree-fre-details" } */
struct S { float f; };
int __attribute__((noinline))
@@ -11,5 +11,5 @@ foo (float *r, struct S *p)
return i + *q;
}
-/* { dg-final { scan-tree-dump-times "\\\*q" 1 "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced\[^\n\]*with i_." "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Os -fdump-tree-pre-details" } */
+/* { dg-options "-O -fdump-tree-fre-details" } */
typedef union
{
@@ -23,5 +23,5 @@ void foo(SA* pResult, SB* method, SC* se
pResult->data = pResult->data;
}
-/* { dg-final { scan-tree-dump "Deleted redundant store" "pre" } } */
-/* { dg-final { cleanup-tree-dump "pre" } } */
+/* { dg-final { scan-tree-dump "Deleted redundant store" "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -12,7 +12,8 @@ foo ( struct S *p)
}
-/* There should only be one load of p->f because fwprop can change *(int *)&p->f into just (int)p->f. */
-/* { dg-final { scan-tree-dump-times "p_.\\\(D\\\)->f" 1 "fre" } } */
+/* There should only be one load of p->f because fwprop can change
+ *(int *)&p->f into just (int)p->f. */
+/* { dg-final { scan-tree-dump-times "= \[^\n\]*p_.\\\(D\\\)" 1 "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -23,5 +23,5 @@ int vnum_test8(int *data)
}
/* We should eliminate m - n, n + k, set data[5] = 0, eliminate the
address arithmetic for data[5], and set p = 0.
-/* { dg-final { scan-tree-dump-times "Eliminated: 7" 1 "fre"} } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 5" 1 "fre"} } */
/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -7,6 +7,6 @@ foo (int *array)
return array[1];
return 0;
}
-/* We should eliminate one address calculation, and one load. */
-/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "fre"} } */
+/* We should eliminate one load. */
+/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "fre"} } */
/* { dg-final { cleanup-tree-dump "fre" } } */
===================================================================
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-forwprop1 -w" } */
+/* { dg-options "-O1 -fdump-tree-esra -w" } */
#define vector __attribute__((vector_size(16) ))
struct VecClass
@@ -15,7 +15,8 @@ vector float foo( vector float v )
return y.v;
}
-/* We should be able to convert the cast to a VCE in forwprop1. */
-/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "forwprop1"} } */
-/* { dg-final { cleanup-tree-dump "forwprop1" } } */
-
+/* We should be able to remove the intermediate struct and directly
+ return x. As we do not fold VIEW_CONVERT_EXPR<struct VecClass>(x).v
+ that doesn't happen right now. */
+/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "esra"} } */
+/* { dg-final { cleanup-tree-dump "esra" } } */
===================================================================
@@ -25,5 +25,7 @@ int foo(Object&o)
return o[0];
}
-/* { dg-final { scan-tree-dump-not ".* = \[^>;\]*;" "dce2" } } */
+/* Remaining should be two loads. */
+
+/* { dg-final { scan-tree-dump-times " = \[^\n\]*;" 2 "dce2" } } */
/* { dg-final { cleanup-tree-dump "dce2" } } */