[gcc(refs/users/aoliva/heads/testme)] testsuite: riscv: gcc-15 reorders poly_licm-1.c insns
Alexandre Oliva
aoliva@gcc.gnu.org
Sat Jan 31 05:56:28 GMT 2026
https://gcc.gnu.org/g:7f53a1df3b42a5cc01cccd293d61afa369dfa7ce
commit 7f53a1df3b42a5cc01cccd293d61afa369dfa7ce
Author: Alexandre Oliva <oliva@adacore.com>
Date: Sat Jan 31 01:52:32 2026 -0300
testsuite: riscv: gcc-15 reorders poly_licm-1.c insns
Despite disabling insn scheduling, the expected insns that used to be
adjacent in gcc-14 have no longer been since gcc-15.
Switch to check-function-bodies to accept intervening insns more
clearly.
Actually, trunk has them adjacent again, but I guess some extra
flexibility here won't hurt.
for gcc/testsuite/ChangeLog
* gcc.target/riscv/rvv/autovec/poly_licm-1.c: Don't require
the expected insns to be adjacent.
Diff:
---
gcc/testsuite/gcc.target/riscv/rvv/autovec/poly_licm-1.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/poly_licm-1.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/poly_licm-1.c
index b7da65f09964..6180871ee840 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/poly_licm-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/poly_licm-1.c
@@ -1,11 +1,22 @@
/* { dg-do compile } */
/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-final { check-function-bodies "**" "" } } */
extern int wsize;
typedef unsigned short Posf;
#define NIL 0
+/*
+** foo:
+** ...
+** addi\s+\s*[a-x0-9]+,\s*[a-x0-9]+,\s*-1
+** ...
+** vid\.v\s+v[0-9]+
+** ...
+** vrsub\.vx\s+[a-x0-9]+,\s*[a-x0-9]+,\s*[a-x0-9]+
+** ...
+*/
void foo (Posf *p)
{
register unsigned n, m;
@@ -14,5 +25,3 @@ void foo (Posf *p)
*p = (Posf)(m >= wsize ? m-wsize : NIL);
} while (--n);
}
-
-/* { dg-final { scan-assembler-times {vid\.v\s+v[0-9]+\s+addi\s+\s*[a-x0-9]+,\s*[a-x0-9]+,\s*-1\s+vrsub\.vx\s+} 1 } } */
More information about the Gcc-cvs
mailing list