public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] testsuite: Add case-values-threshold to pr107876.C
@ 2023-02-02 14:54 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2023-02-02 14:54 UTC (permalink / raw)
  To: gcc-patches

This test was failing on aarch64 because aarch64 overrides
TARGET_CASE_VALUES_THRESHOLD.  The maximum value that allows
the test to pass appears to be 6, but the default threshold
is 4 or 5 (depending on whether casesi is provided).
Going for 4 seemed safest, in case any target-specific
features force the maximum passing threshold to be lower
on some targets.

Tested on aarch64-linux-gnu & x86_64-linux-gnu.  Pushed as obvious.

Richard


gcc/testsuite/
	* g++.dg/tree-ssa/pr107876.C: Add --param case-values-threshold=4.
---
 gcc/testsuite/g++.dg/tree-ssa/pr107876.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr107876.C b/gcc/testsuite/g++.dg/tree-ssa/pr107876.C
index 6cff2f1b166..d920ba050ea 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr107876.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr107876.C
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-require-effective-target c++11 }
-// { dg-options "-O2 -funswitch-loops --param max-unswitch-insns=5 -fdump-tree-unswitch-details" }
+// { dg-options "-O2 -funswitch-loops --param max-unswitch-insns=5 --param case-values-threshold=4 -fdump-tree-unswitch-details" }
 
 class X {
 public:
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-02 14:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02 14:54 [pushed] testsuite: Add case-values-threshold to pr107876.C Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).