From: Martin Liska Date: Tue, 1 Dec 2020 19:38:40 +0000 (+0100) Subject: if-to-switch: Fix test-suite patterns. X-Git-Tag: upstream/12.2.0~11336 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efd1d4f8ae2850e5cd8028531dfe4eced628489e;p=platform%2Fupstream%2Fgcc.git if-to-switch: Fix test-suite patterns. gcc/testsuite/ChangeLog: PR testsuite/98085 * g++.dg/tree-ssa/if-to-switch-1.C: Do not expect precise number of BBs. * gcc.dg/tree-ssa/if-to-switch-1.c: Likewise. * gcc.dg/tree-ssa/if-to-switch-2.c: Likewise. Find better name for the function. * gcc.dg/tree-ssa/if-to-switch-3.c: Likewise. Find better name for the function. * gcc.dg/tree-ssa/if-to-switch-5.c: Likewise. --- diff --git a/gcc/testsuite/g++.dg/tree-ssa/if-to-switch-1.C b/gcc/testsuite/g++.dg/tree-ssa/if-to-switch-1.C index 88505e8..96c4d57 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/if-to-switch-1.C +++ b/gcc/testsuite/g++.dg/tree-ssa/if-to-switch-1.C @@ -22,4 +22,4 @@ void tree_node() { int g = 0; } -/* { dg-final { scan-tree-dump "Condition chain with 3 BBs transformed into a switch statement." "iftoswitch" } } */ +/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c index 92df4e9..52f92ae 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c @@ -32,4 +32,4 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-tree-dump "Condition chain with 5 BBs transformed into a switch statement." "iftoswitch" } } */ +/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c index 36e62ae..c229614 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c @@ -1,11 +1,11 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */ -int IsHTMLWhitespaceNoRange(int aChar) +int isMyRandomCharacter(int aChar) { return aChar == 0x0001 || aChar == 0x000A || aChar == 0x000C || aChar == 0x000E || aChar == 0x0020; } -/* { dg-final { scan-tree-dump "Condition chain with 3 BBs transformed into a switch statement." "iftoswitch" } } */ +/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c index 9a4ce16..4c7253c 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c @@ -1,11 +1,11 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */ -int IsHTMLWhitespace(int aChar) +int IsMySuperRandomChar(int aChar) { return aChar == 0x0009 || aChar == 0x000A || aChar == 0x000C || aChar == 0x000D || aChar == 0x0020 || aChar == 0x0030; } -/* { dg-final { scan-tree-dump "Condition chain with 3 BBs transformed into a switch statement." "iftoswitch" } } */ +/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c index 7734a58..43b0f31 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c @@ -9,4 +9,4 @@ int crud (unsigned char c) || (int) c == 39) != 0); } -/* { dg-final { scan-tree-dump "Condition chain with 5 BBs transformed into a switch statement." "iftoswitch" } } */ +/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into a switch statement." "iftoswitch" } } */