]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Fix -march error of zhinxmin testcases
authorLehua Ding <lehua.ding@rivai.ai>
Fri, 18 Aug 2023 02:52:53 +0000 (10:52 +0800)
committerLehua Ding <lehua.ding@rivai.ai>
Fri, 18 Aug 2023 07:01:22 +0000 (15:01 +0800)
This little patch fixs the -march error of a zhinxmin testcase I added earlier
and an old zhinxmin testcase, since these testcases are for zhinxmin extension
and not zfhmin extension.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/_Float16-zhinxmin-3.c: Adjust.
* gcc.target/riscv/_Float16-zhinxmin-4.c: Ditto.

gcc/testsuite/gcc.target/riscv/_Float16-zhinxmin-3.c
gcc/testsuite/gcc.target/riscv/_Float16-zhinxmin-4.c

index 7a43641a5a6e47686845cc611da13312aae809b2..939b37873836b5bf10f5df87885cd5bed20e147b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-march=rv64if_zfhmin -mabi=lp64f -O" } */
+/* { dg-options "-march=rv64i_zhinxmin -mabi=lp64 -O" } */
 
 int foo1 (_Float16 a, _Float16 b)
 {
index 4ac492288989424a2c0eed60d8ce3c044055f597..ebc615a483f0eb053a3f04caca7d041117f786a0 100644 (file)
@@ -1,11 +1,12 @@
 /* { dg-do compile } */
-/* { dg-options "-march=rv64if_zfhmin -mabi=lp64 -O3 -mcmodel=medany" } */
+/* { dg-options "-march=rv64i_zhinxmin -mabi=lp64 -O3 -mcmodel=medany" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
 /* Make sure zfhmin behaves the same way as zfh. */
 /*
 ** foo: { target { no-opts "-flto" } }
-**   lh\ta0,\.LC0
+**   lla\ta[0-9]+,\.LC0
+**   lhu\ta[0-9]+,0\(a[0-9]+\)
 **   ...
 */
 _Float16 foo() { return 0.8974; }