]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PATCH] RISC-V: Skip shift-shift-7.c under -Og
authorJim Lin <jim@andestech.com>
Mon, 6 Jul 2026 15:37:25 +0000 (09:37 -0600)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Mon, 6 Jul 2026 15:37:50 +0000 (09:37 -0600)
At -Og the a << 1 is kept as a separate slliw instead of being folded
into the zero_extendsidi2_shifted sequence, so the "slli" regex matches
both slliw and slli and the scan-assembler-times "slli" 1 check fails.
Skip the test under -Og.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/shift-shift-7.c: Skip under -Og.

gcc/testsuite/gcc.target/riscv/shift-shift-7.c

index 3ecd9ebdc39c5dae43de42b77644db3a58d88a6c..8fe9143960e61bbe17a08889254b660155de4757 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv64gc -mabi=lp64" } */
-/* { dg-skip-if "" { *-*-* } { "-O0" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
 
 /* Test for zero_extendsidi2_shifted handling arbitrary mask widths
    (not just 32 bits). */