From c4d283b142790063693be2d517f0209ce2f84499 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 24 Sep 2020 13:30:11 +0200 Subject: [PATCH] [testsuite] Scan final instead of asm in independent-cloneids-1.c When running test-case gcc.dg/independent-cloneids-1.c for nvptx, we get: ... FAIL: scan-assembler-times (?n)^_*bar[.$_]constprop[.$_]0: 1 FAIL: scan-assembler-times (?n)^_*bar[.$_]constprop[.$_]1: 1 FAIL: scan-assembler-times (?n)^_*bar[.$_]constprop[.$_]2: 1 FAIL: scan-assembler-times (?n)^_*foo[.$_]constprop[.$_]0: 1 FAIL: scan-assembler-times (?n)^_*foo[.$_]constprop[.$_]1: 1 FAIL: scan-assembler-times (?n)^_*foo[.$_]constprop[.$_]2: 1 ... The test expects to find something like: ... bar.constprop.0: ... but instead on nvptx we have: ... .func (.param.u32 %value_out) bar$constprop$0 ... Fix this by rewriting the scans to use the final dump instead. Tested on x86_64. gcc/testsuite/ChangeLog: 2020-09-24 Tom de Vries * gcc.dg/independent-cloneids-1.c: Use scan-rtl-dump instead of scan-assembler. --- gcc/testsuite/gcc.dg/independent-cloneids-1.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/gcc.dg/independent-cloneids-1.c b/gcc/testsuite/gcc.dg/independent-cloneids-1.c index 516211a6e86..efbc1c51da0 100644 --- a/gcc/testsuite/gcc.dg/independent-cloneids-1.c +++ b/gcc/testsuite/gcc.dg/independent-cloneids-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fipa-cp -fipa-cp-clone" } */ +/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-rtl-final" } */ /* { dg-skip-if "Odd label definition syntax" { mmix-*-* } } */ extern int printf (const char *, ...); @@ -29,11 +29,11 @@ baz (int arg) return foo (8); } -/* { dg-final { scan-assembler-times {(?n)^_*bar[.$_]constprop[.$_]0:} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^_*bar[.$_]constprop[.$_]1:} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^_*bar[.$_]constprop[.$_]2:} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^_*foo[.$_]constprop[.$_]0:} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^_*foo[.$_]constprop[.$_]1:} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^_*foo[.$_]constprop[.$_]2:} 1 } } */ -/* { dg-final { scan-assembler-not {(?n)^_*foo[.$_]constprop[.$_]3:} } } */ -/* { dg-final { scan-assembler-not {(?n)^_*foo[.$_]constprop[.$_]4:} } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function bar.constprop \(bar[.$_]constprop[.$_]0,} 1 "final" } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function bar.constprop \(bar[.$_]constprop[.$_]1,} 1 "final" } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function bar.constprop \(bar[.$_]constprop[.$_]2,} 1 "final" } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]0,} 1 "final" } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]1,} 1 "final" } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]2,} 1 "final" } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]3,} 0 "final" } } */ +/* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]4,} 0 "final" } } */ -- 2.30.2