Fix two testcases for ssa names which are more than 1 digit
authorAndrew Pinski <apinski@marvell.com>
Sun, 23 May 2021 17:35:40 +0000 (17:35 +0000)
committerAndrew Pinski <apinski@marvell.com>
Mon, 24 May 2021 01:11:15 +0000 (01:11 +0000)
phi-opt-10.c and phi-opt-7.c both depend on currently that some ssa name
versions are one digit long which is not always correct. This fixes the
problem by detecting digits rather than just using '.'.

Committed as obvious after a bootstrap/test.

Thanks,
Andrew Pinski

gcc/testsuite/ChangeLog
* gcc.dg/tree-ssa/phi-opt-10.c: Use "\[0-9\]*" instead of '.'
when matching ssa name version.
* gcc.dg/tree-ssa/phi-opt-7.c: Likewise.

gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c

index 4c190e6..3681fa7 100644 (file)
@@ -7,4 +7,4 @@ int eqm1_phi (unsigned long a) { return a ? 0 : -1; }
 int spaceship1 (long a) { return a > 0 ? 1 : a < 0 ? -1 : 0; }
 int spaceship2 (long a) { return a > 0 ? 1 : a == 0 ? 0 : -1; }
 
-/* { dg-final { scan-tree-dump-times " = -\[^\r\n\]*_.;" 4 "optimized"} } */
+/* { dg-final { scan-tree-dump-times " = -\[^\r\n\]*_\[0-9\]*;" 4 "optimized"} } */
index 18ecbd5..51e1f6d 100644 (file)
@@ -18,5 +18,5 @@ int f(int t, int c)
 /* There should be one ifs as one of them should be changed into
    a conditional and the other should be there still.  */
 /* { dg-final { scan-tree-dump-times "if" 1 "optimized" }  }*/
-/* { dg-final { scan-tree-dump-times "\[^\r\n\]*_. = c_\[0-9\]*.D. != 0" 1 "optimized"  } } */
+/* { dg-final { scan-tree-dump-times "\[^\r\n\]*_\[0-9\]* = c_\[0-9\]*.D. != 0" 1 "optimized"  } } */