]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V/testsuite: Widen coverage for pr105314.c
authorMaciej W. Rozycki <macro@embecosm.com>
Fri, 26 Jan 2024 21:47:40 +0000 (21:47 +0000)
committerMaciej W. Rozycki <macro@embecosm.com>
Fri, 26 Jan 2024 21:47:40 +0000 (21:47 +0000)
The optimization levels pr105314.c is iterated over are needlessly
overridden with "-O2", limiting the coverage of the test case to that
level, perhaps with additional options the original optimization level
has been supplied with.  We could prevent the extra iterations other
than "-O2" from being run, but the transformation made by if-conversion
is also expected to happen at other optimization levels, so include them
all, and also make sure no reverse-condition branch appears in output,
moving the `dg-final' command to the bottom, as with most test cases.

gcc/testsuite/
* gcc.target/riscv/pr105314.c: Replace `dg-options' command with
`dg-skip-if'.  Also reject "bne" with `dg-final'.

gcc/testsuite/gcc.target/riscv/pr105314.c

index 6b6a60788f5a595d7501e108c054508e80e98484..436b523d016ea9136077aa6bc262aebdd8ce9dd6 100644 (file)
@@ -1,7 +1,6 @@
 /* PR rtl-optimization/105314 */
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-not "\tbeq\t" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-Os" "-Oz" } } */
 
 long
 foo (long a, long b, long c)
@@ -10,3 +9,5 @@ foo (long a, long b, long c)
     a = 0;
   return a;
 }
+
+/* { dg-final { scan-assembler-not "\\s(?:beq|bne)\\s" } } */