]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: riscv: set expected code model
authorAlexandre Oliva <oliva@adacore.com>
Sun, 1 Feb 2026 07:35:30 +0000 (04:35 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Sun, 1 Feb 2026 07:35:30 +0000 (04:35 -0300)
When testing a compiler configured to default to the medany code
model, riscv autovec binop vadd and vsub -nofm tests fail because
their codegen expectations don't match the generated code.

Set the code model to the medlow model that the tests expect.

for  gcc/testsuite/ChangeLog

* gcc.target/riscv/rvv/autovec/binop/vadd-rv32gcv-nofm.c: Set the
expected code model explicitly.
* gcc.target/riscv/rvv/autovec/binop/vadd-rv64gcv-nofm.c: Likewise.
* gcc.target/riscv/rvv/autovec/binop/vsub-rv32gcv-nofm.c: Likewise.
* gcc.target/riscv/rvv/autovec/binop/vsub-rv64gcv-nofm.c: Likewise.

gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vadd-rv32gcv-nofm.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vadd-rv64gcv-nofm.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vsub-rv32gcv-nofm.c
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vsub-rv64gcv-nofm.c

index ca0ea0b16c845c73899a57fc636ffd4de49eead3..64596235018b1e3febc7591ae60dbb97eb5ba3ac 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv32gcv_zvfh -mabi=ilp32d -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv32gcv_zvfh -mabi=ilp32d -mcmodel=medlow -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
 
 #include "vadd-template.h"
 
index c839ac7d78043983b80daca6e190e68d6380211e..a78abf43c93136d6a7ba9027b9b4ccde5395fc80 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv64gcv_zvfh -mabi=lp64d -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv64gcv_zvfh -mabi=lp64d -mcmodel=medlow -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
 
 #include "vadd-template.h"
 
index c57ac805372f0e5469f5c4c05499abc0adb2941b..926ab7e4a55fe40b2940f6d76203df295b3a429f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv32gcv_zvfh -mabi=ilp32d -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv32gcv_zvfh -mabi=ilp32d -mcmodel=medlow -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
 
 #include "vsub-template.h"
 
index a79d7270d886537c2c779a8763aff6a09f9c1d92..a29b2e8c3fdf7bafd34804e16e7f2009917c06aa 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv64gcv_zvfh -mabi=lp64d -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
+/* { dg-additional-options "-std=c99 -fno-vect-cost-model -march=rv64gcv_zvfh -mabi=lp64d -mcmodel=medlow -mrvv-vector-bits=scalable -fdump-tree-optimized-details -fno-pie" } */
 
 #include "vsub-template.h"