]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: riscv: set expected code model for pr113206-2.c
authorAlexandre Oliva <oliva@adacore.com>
Sun, 1 Feb 2026 07:35:33 +0000 (04:35 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Sun, 1 Feb 2026 07:35:33 +0000 (04:35 -0300)
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.

gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c

index a3c61b467dab41e6ddd33065f1508804ddf86945..98b51d7a34bbf430daf71fe795188239277523e1 100644 (file)
@@ -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;