On ppc64le some conditions in BBs are not merged so we merge
a different number of BBs.
Pushed as obvious. Tested on x86_64-linux-gnu and ppc64le-linux-gnu.
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.
---
gcc/testsuite/g++.dg/tree-ssa/if-to-switch-1.C | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c | 4 ++--
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c | 4 ++--
gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-5.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
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 88505e8869f..96c4d577064 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 92df4e93bfa..52f92ae145d 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 36e62ae5be1..c229614a3d8 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 9a4ce160238..4c7253ce212 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 7734a58500b..43b0f31b2ff 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" } } */
--
2.29.2