diff mbox

Fix scan-tree-dump-times syntax errors in gcc.dg/tree-ssa/attr-hotcold-2.c

Message ID 5767F898.2060006@foss.arm.com
State New
Headers show

Commit Message

Renlin Li June 20, 2016, 2:07 p.m. UTC
Hi,

This is a simple patch to fix the syntax errors in dg-final directive 
lines within this test case.

According to the documentation, the syntax of this directive should be:
'''scan-tree-dump-times regex num suffix [{ target/xfail selector }]'''


Now the test case compilers Okay in arm environment. However, the last 
two checks seem failing. This is another issue.

Okay to commit?

Regards,
Renlin

gcc/testsuite/ChangeLog:

2016-06-20  Renlin Li  <renlin.li@arm.com>

	* gcc.dg/tree-ssa/attr-hotcold-2.c: Fix syntax errors.

On 13/06/16 17:35, Kyrill Tkachov wrote:
> Hi Honza,
>
> On 07/06/16 20:27, Jan Hubicka wrote:
>> Hello,
>> Maritn Liska measured branch predictor hitrates on current tree and

>
> In the testsuite I'm seeing:
> ERROR: gcc.dg/tree-ssa/attr-hotcold-2.c: error executing dg-final:
> syntax error in target selector "profile_estimate"
>
> on aarch64-none-elf.
> I think the hunk:
> -/* { dg-final { scan-ipa-dump-times "block 4, loop depth 0, count 0,
> freq 1\[^0-9\]" 1 "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times 1 "hot label heuristics" 1
> "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times 1 "cold label heuristics" 1
> "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times "block 4, loop depth 0, count 0,
> freq \[1-4\]\[^0-9\]" 1 "profile_estimate" } } */
>
> is buggy, should it be
> -/* { dg-final { scan-ipa-dump-times "block 4, loop depth 0, count 0,
> freq 1\[^0-9\]" 1 "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times "hot label heuristics" 1
> "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times "cold label heuristics" 1
> "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times "block 4, loop depth 0, count 0,
> freq \[1-4\]\[^0-9\]" 1 "profile_estimate" } } */
> ?
>
> With that change the test runs but still FAILs:
> FAIL: gcc.dg/tree-ssa/attr-hotcold-2.c scan-tree-dump-times
> profile_estimate "block 4, loop depth 0, count 0, freq [1-4][^0-9]" 1
> FAIL: gcc.dg/tree-ssa/attr-hotcold-2.c scan-tree-dump-times
> profile_estimate "block 5, loop depth 0, count 0, freq
> [6-9][0-9][0-9][0-9]" 1
>
> Thanks,
> Kyrill

Comments

Jakub Jelinek June 20, 2016, 2:11 p.m. UTC | #1
On Mon, Jun 20, 2016 at 03:07:20PM +0100, Renlin Li wrote:
> Okay to commit?
> 
> Regards,
> Renlin
> 
> gcc/testsuite/ChangeLog:
> 
> 2016-06-20  Renlin Li  <renlin.li@arm.com>
> 
> 	* gcc.dg/tree-ssa/attr-hotcold-2.c: Fix syntax errors.

This is obvious.  Please check it in.  Though, it also shows that
it couldn't have been properly tested.

> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
> index 6623d9e..e2e8143 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
> @@ -18,8 +18,8 @@ void f(int x, int y)
>    return;
>  }
>  
> -/* { dg-final { scan-tree-dump-times 1 "hot label heuristics" 1 "profile_estimate" } } */
> -/* { dg-final { scan-tree-dump-times 1 "cold label heuristics" 1 "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times "hot label heuristics" 1 "profile_estimate" } } */
> +/* { dg-final { scan-tree-dump-times "cold label heuristics" 1 "profile_estimate" } } */
>  /* { dg-final { scan-tree-dump-times "block 4, loop depth 0, count 0, freq \[1-4\]\[^0-9\]" 1 "profile_estimate" } } */
>  
>  /* Note: we're attempting to match some number > 6000, i.e. > 60%.


	Jakub
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
index 6623d9e..e2e8143 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
@@ -18,8 +18,8 @@  void f(int x, int y)
   return;
 }
 
-/* { dg-final { scan-tree-dump-times 1 "hot label heuristics" 1 "profile_estimate" } } */
-/* { dg-final { scan-tree-dump-times 1 "cold label heuristics" 1 "profile_estimate" } } */
+/* { dg-final { scan-tree-dump-times "hot label heuristics" 1 "profile_estimate" } } */
+/* { dg-final { scan-tree-dump-times "cold label heuristics" 1 "profile_estimate" } } */
 /* { dg-final { scan-tree-dump-times "block 4, loop depth 0, count 0, freq \[1-4\]\[^0-9\]" 1 "profile_estimate" } } */
 
 /* Note: we're attempting to match some number > 6000, i.e. > 60%.