]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Adjust for short-enums in match-shift-cmp-3 [PR124909]
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 17 Apr 2026 13:39:14 +0000 (14:39 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Wed, 22 Apr 2026 12:49:37 +0000 (13:49 +0100)
On targets that use short enums, this test produces different output
since the fold optimization does not apply to sizes smaller than a word.

Adjust the expected results until such time as this optimization can
be expanded to support shorter input values.

gcc/testsuite/ChangeLog:

PR tree-optimization/124909

* gcc.dg/match-shift-cmp-3.c:  Adjust expected results for
target short_enums.

gcc/testsuite/gcc.dg/match-shift-cmp-3.c

index e46ac30b905fbb795e5cb22cce23d4e8732f749f..5278b376717d0021e9aa095b138fabdd79a83a3f 100644 (file)
@@ -39,5 +39,7 @@ TEST_OP_CST (ne, !=, -2)
 TEST_OP (eq, ==)
 TEST_OP (ne, !=)
 
-/* { dg-final { scan-tree-dump-times "return 0;" 6 optimized } } */
-/* { dg-final { scan-tree-dump-times "return 1;" 6 optimized } } */
+/* { dg-final { scan-tree-dump-times "return 0;" 6 optimized { target { ! short_enums } } } } */
+/* { dg-final { scan-tree-dump-times "return 1;" 6 optimized { target { ! short_enums } } } } */
+/* { dg-final { scan-tree-dump-times "return 0;" 4 optimized { target { short_enums } } } } */
+/* { dg-final { scan-tree-dump-times "return 1;" 4 optimized { target { short_enums } } } } */