]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite/103278 - adjust gcc.dg/tree-ssa/if-to-switch-3.c
authorRichard Biener <rguenther@suse.de>
Thu, 18 Nov 2021 08:49:38 +0000 (09:49 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 18 Nov 2021 09:02:17 +0000 (10:02 +0100)
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.

gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-3.c

index 707e63048924bf68249d92416075eea12dd22b1c..a55231b33411db73157cf8070b3b81c0eda41089 100644 (file)
@@ -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)
 {