Ok for trunk?
--
The tests were added in commit r17-4921-g8b90726a28bb63, but
fp-trapping-cmp-7.c has never passed on Cortex-M targets that disable
non-short-circuit operations.
The optimizations checked by these tests depend on the target's
logical-op-non-short-circuit setting. Enable it explicitly in both
tests so they check the intended ifcombine behavior independently of
target tuning.
PR tree-optimization/53805
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/fp-trapping-cmp-6.c: Pass --param
logical-op-non-short-circuit=1.
* gcc.dg/tree-ssa/fp-trapping-cmp-7.c: Likewise
Signed-off-by: Torbjörn SVENSSON <[email protected]>
---
gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-6.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-7.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-6.c
b/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-6.c
index 4ffb5a140c0..553b31b364a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -ftrapping-math -fdump-tree-ifcombine-details" } */
+/* { dg-options "-O1 -ftrapping-math -fdump-tree-ifcombine-details --param
logical-op-non-short-circuit=1" } */
int
f (double a, double b)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-7.c
b/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-7.c
index 5916344877f..51a6f3bc761 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/fp-trapping-cmp-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -ftrapping-math -fdump-tree-ifcombine-details" } */
+/* { dg-options "-O1 -ftrapping-math -fdump-tree-ifcombine-details --param
logical-op-non-short-circuit=1" } */
int
f (double a, double b)
--
2.43.0