I did test this testcase but I must have missed it failing somehow.
Anyways the problem is the scan-tree-dump is missing checking for u< and u>
which can show up in some cases.

Pushed as obvious after a quick test to make sure there is no failure any more.

gcc/testsuite/ChangeLog:

        * gcc.dg/pr94589-5a.c: Allow for `u<` and `u>` in the scan too.

Signed-off-by: Andrew Pinski <[email protected]>
---
 gcc/testsuite/gcc.dg/pr94589-5a.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/pr94589-5a.c 
b/gcc/testsuite/gcc.dg/pr94589-5a.c
index f96e72786b2..73e188edbfc 100644
--- a/gcc/testsuite/gcc.dg/pr94589-5a.c
+++ b/gcc/testsuite/gcc.dg/pr94589-5a.c
@@ -1,8 +1,8 @@
 /* PR tree-optimization/94589 */
 /* { dg-do compile { target inf } } */
 /* { dg-options "-O2 -g0 -fdump-tree-optimized -fno-trapping-math" } */
-/* { dg-final { scan-tree-dump-times "\[ij]_\[0-9]+\\(D\\) 
(?:<|<=|>|>=|u>=|u<=) \[ij]_\[0-9]+\\(D\\)" 24 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "i_\[0-9]+\\(D\\) (?:<|<=|>|>=|u>=|u<=) 
5\\.0" 24 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\[ij]_\[0-9]+\\(D\\) 
(?:<|<=|>|>=|u>=|u<=|u<|u>) \[ij]_\[0-9]+\\(D\\)" 24 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "i_\[0-9]+\\(D\\) 
(?:<|<=|>|>=|u>=|u<=|u<|u>) 5\\.0" 24 "optimized" } } */
 
 #define A __attribute__((noipa))
 A int f3 (double i, double j) { int c; if (i == j) c = 0; else if (i < j) c = 
-1; else if (i > j) c = 1; else c = -128; return c > 0; }
-- 
2.43.0

Reply via email to