On Okt 20 2022, jiawei wrote:

> diff --git a/gcc/testsuite/gcc.target/riscv/_Float16-zhinx-1.c 
> b/gcc/testsuite/gcc.target/riscv/_Float16-zhinx-1.c
> new file mode 100644
> index 00000000000..90172b57e05
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/riscv/_Float16-zhinx-1.c
> @@ -0,0 +1,10 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64i_zhinx -mabi=lp64 -O" } */
> +
> +_Float16 foo1 (_Float16 a, _Float16 b)
> +{
> +    return b;
> +}
> +
> +/* { dg-final { scan-assembler-not "fmv.h" } } */
> +/* { dg-final { scan-assembler-times "mv" 1 } } */

This fails with -flto (mv is found twice).

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to