will have a try for this approach.
>
> Pan
>
> From: juzhe.zh...@rivai.ai
> Sent: Thursday, June 8, 2023 4:32 PM
> To: kito.cheng
> Cc: Li, Pan2 ; gcc-patches ;
> Robin Dapp ; jeffreyalaw ; Wang,
> Yanzhang
> Subject: Re: Re: [PATCH v8] RISC-V: Refactor requirement of
, Yanzhang
Subject: Re: Re: [PATCH v8] RISC-V: Refactor requirement of ZVFH and ZVFHMIN.
I have an idea base on what Kito said.
We enable vfadd FP16 for TARGET_ZVFH. But we don't need to add TARGET_VECTOR &&
for each instruction.
We can reference riscv.md:
(define_attr "ext_enabled
tr "type" "vfalu")
(and eq_attr "mode" "VNx1HF")
(match_test "!TARGET_ZVFH")))
(const_string "no")
]
(const_string "yes")))
I think you can do experiment with this to see whether it can disable MD
pattern.
juzh
Looks doable up to a point, I will have a try and keep you posted.
Pan
-Original Message-
From: Kito Cheng
Sent: Thursday, June 8, 2023 3:58 PM
To: juzhe.zh...@rivai.ai
Cc: Li, Pan2 ; gcc-patches ; Robin
Dapp ; jeffreyalaw ; Wang, Yanzhang
Subject: Re: [PATCH v8] RISC-V: Refactor
Oh. Good suggestion. It's much better than my solution I think.
juzhe.zh...@rivai.ai
From: Kito Cheng
Date: 2023-06-08 15:58
To: juzhe.zh...@rivai.ai
CC: pan2.li; gcc-patches; Robin Dapp; jeffreyalaw; yanzhang.wang
Subject: Re: [PATCH v8] RISC-V: Refactor requirement of ZVFH and ZVFHM
I am thinking, is it possible to use mode attr to remove the overhead
of checking the mode for other FP modes other than FP16?
e.g.
(define_mode_attr TARGET_FP_FULL_OPERATION_CHECKING [
(VNx1HF "TARGET_ZVFH")
...
(VNx1SF "1")
...
])
"TARGET_VECTOR && riscv_vector::float_mode_supported_p (m
LGTM. Let's wait for Jeff and Robin. After this patch, we can start FP16
autovec.
juzhe.zh...@rivai.ai
From: pan2.li
Date: 2023-06-08 14:29
To: gcc-patches
CC: juzhe.zhong; rdapp.gcc; jeffreyalaw; pan2.li; yanzhang.wang; kito.cheng
Subject: [PATCH v8] RISC-V: Refactor requirement of ZVFH and