aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-11-18 09:49:38 +0100
committerRichard Biener <rguenther@suse.de>2021-11-18 10:02:17 +0100
commite28afbb90f8eca31d0a658e92e2007eb0db2a964 (patch)
tree04aceb282f4c7b852514ce3d146453f955de084b
parent8f9f5101d52fec12f0f18dfaf746d18cf1f230d0 (diff)
downloadgcc-e28afbb90f8eca31d0a658e92e2007eb0db2a964.zip
gcc-e28afbb90f8eca31d0a658e92e2007eb0db2a964.tar.gz
gcc-e28afbb90f8eca31d0a658e92e2007eb0db2a964.tar.bz2
testsuite/103278 - adjust gcc.dg/tree-ssa/if-to-switch-3.c
Analysis shows that after the CD-DCE change we produce better code which makes if-to-switch run into case-values-threshold on some architectures, thus the switch is deemed to simple to be worth generating. The following statically provides --param case-values-threshold to make the testcase less target dependent. 2021-11-18 Richard Biener <rguenther@suse.de> PR testsuite/103278 * gcc.dg/tree-ssa/if-to-switch-3.c: Supply --param case-values-threshold=4.
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c3
1 files changed, 2 insertions, 1 deletions
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 707e630..a55231b 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,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */
+/* Supplying case-values-threshold makes the testcase less target dependent. */
+/* { dg-options "-O2 -fdump-tree-iftoswitch-optimized --param case-values-threshold=4" } */
int IsMySuperRandomChar(int aChar)
{