https://gcc.gnu.org/g:8f2f78a72ec3f5f94d20e47b88943e6fcde2ddc5
commit r16-7225-g8f2f78a72ec3f5f94d20e47b88943e6fcde2ddc5 Author: Alexandre Oliva <[email protected]> Date: Sun Feb 1 04:35:33 2026 -0300 testsuite: riscv: set expected code model for pr113206-2.c With a compiler that defaults to cmodel medany, pr113206-2.c ends up generating an extra vsetvli insn. Set the code model explicitly to medlow to meet the expectation. This is unfortunately not enough to get the test to a pass on trunk. It is on gcc-15 and the change is an improvement, but trunk still gets an unexpected vsetvli even with the change. for gcc/testsuite/ChangeLog * gcc.target/riscv/rvv/autovec/pr113206-2.c: Set the expected code model explicitly. Diff: --- gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c index a3c61b467dab..98b51d7a34bb 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -frename-registers -mrvv-max-lmul=m8" } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -mcmodel=medlow -O3 -frename-registers -mrvv-max-lmul=m8" } */ signed char e; short f = 8;
