https://gcc.gnu.org/g:8ad11691d3daab965fc34572e7683fe02b25e741
commit r16-7385-g8ad11691d3daab965fc34572e7683fe02b25e741 Author: Jeff Law <[email protected]> Date: Sat Feb 7 11:49:30 2026 -0700 Fix testsuite scan failure on loongarch64 Robin's patch to fix nonzero bits for the result of a popcount triggered a minor testsuite scan failure for loongarch. Essentially it was expecting to see an ANDI for a zero-extend, but after the change we get a slli with a count 0, which is used for sign extension on loongarch. Both are likely equally performant. So this just adjusts the test to accept both forms. Now one could argue that the result of the popcount is already sign extended and you'd be right -- that's a separate missed optimization issue and unrelated to this testsuite regression. Anyway, pushing this to the trunk. gcc/testsuite/ * gcc.dg/pr90838.c: Adjust expected output for loongarch. Diff: --- gcc/testsuite/gcc.dg/pr90838.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/pr90838.c b/gcc/testsuite/gcc.dg/pr90838.c index 8b06929cfdda..bb3567e6e750 100644 --- a/gcc/testsuite/gcc.dg/pr90838.c +++ b/gcc/testsuite/gcc.dg/pr90838.c @@ -3,7 +3,7 @@ /* { dg-additional-options "-mbmi" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } } */ /* { dg-additional-options "-march=rv64gc_zbb" { target { rv64 } } } */ /* { dg-additional-options "-march=rv32gc_zbb" { target { rv32 } } } */ -/* { dg-require-effective-target int32plus } */ +/* { g-require-effective-target int32plus } */ int ctz1 (unsigned x) { @@ -87,4 +87,4 @@ int ctz4 (unsigned long x) /* { dg-final { scan-tree-dump-times {= \.CTZ} 4 "forwprop2" { target { loongarch64*-*-* } } } } */ /* { dg-final { scan-assembler-times "ctz.d\t" 1 { target { loongarch64*-*-* } } } } */ /* { dg-final { scan-assembler-times "ctz.w\t" 3 { target { loongarch64*-*-* } } } } */ -/* { dg-final { scan-assembler-times "andi\t" 4 { target { loongarch64*-*-* } } } } */ +/* { dg-final { scan-assembler-times "\(andi|slli.w\)\t" 4 { target { loongarch64*-*-* } } } } */
