In GCC 16 the compiler is smarter and it optimizes away the unneeded
zero-extension during the expand pass.  Thus we can no longer match
and_alsl_reversed.

Drop the scan-rtl-dump for and_alsl_reversed and add scan-assembler-not
against bstrpick.d to detect the unneeded zero-extension in case it
regresses in the future.

gcc/testsuite/ChangeLog:

        * gcc.target/loongarch/bstrpick_alsl_paired.c
        (scan-rtl-dump): Remove.
        (scan-assembler-not): Make the test fail if the redundant
        zero-extension is found.
---

Tested on loongarch64-linux-gnu.  Ok for trunk?

 gcc/testsuite/gcc.target/loongarch/bstrpick_alsl_paired.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/loongarch/bstrpick_alsl_paired.c 
b/gcc/testsuite/gcc.target/loongarch/bstrpick_alsl_paired.c
index 166565275da..c7e45964ba5 100644
--- a/gcc/testsuite/gcc.target/loongarch/bstrpick_alsl_paired.c
+++ b/gcc/testsuite/gcc.target/loongarch/bstrpick_alsl_paired.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-mabi=lp64d -O2 -fdump-rtl-combine" } */
-/* { dg-final { scan-rtl-dump "{and_alsl_reversedi}" "combine" } } */
 /* { dg-final { scan-assembler-not 
"alsl.d\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,\\\$r0" } } */
+/* { dg-final { scan-assembler-not "bstrpick\\\.d" } } */
 
 struct SA
 {
-- 
2.50.0

Reply via email to