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.
/* { 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). */