ifcombine depends on BRANCH_COST and the testcase relies on ifcombine
to fully optimize the function.  But the important parts are optimized
everywhere, so the following delectively XFAILs the less important part.

Tested on aarch64 and x86_64-unknown-linux-gnu, pushed.

        PR testsuite/117958
        * g++.dg/tree-ssa/pr117123.C: XFAIL parts on aarch64-*-*.
---
 gcc/testsuite/g++.dg/tree-ssa/pr117123.C | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr117123.C 
b/gcc/testsuite/g++.dg/tree-ssa/pr117123.C
index 2aa2810de95..29b69dfa432 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr117123.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr117123.C
@@ -49,4 +49,6 @@ int patatino(int a) {
 }
 
 // { dg-final { scan-tree-dump-not "dont_be_here" "optimized" } }
-// { dg-final { scan-tree-dump-times "if " 3 "optimized" } }
+// Depending on LOGICAL_OP_NON_SHORT_CIRCUIT (or BRANCH_COST) this might
+// or might not be optimized fully
+// { dg-final { scan-tree-dump-times "if " 3 "optimized" { xfail { aarch64-*-* 
} } } }
-- 
2.43.0

Reply via email to