Re: [PATCH] RISC-V: Don't add fractional LMUL types to V_VLS for XTheadVector

2024-03-22 Thread Christoph Müllner
man; Philipp > Tomsich; Camel Coder; Bruce Hoult; Juzhe-Zhong; Jun Sha; Xianmiao Qu; Jin Ma > CC: Christoph Müllner > Subject: [PATCH] RISC-V: Don't add fractional LMUL types to V_VLS for > XTheadVector > The expansion of `memset` (via expand_builtin_memset_args()) > uses clear_

Re: [PATCH] RISC-V: Don't add fractional LMUL types to V_VLS for XTheadVector

2024-03-22 Thread Christoph Müllner
On Fri, Mar 22, 2024 at 4:43 AM Bruce Hoult wrote: > > > The effect is demonstrated by a new test case that shows > that the by-pieces framework now emits `sb` instructions > instead of triggering an ICE > > So these small memset() now don't use RVV at all if xtheadvector is enabled? Yes, but

Re: [PATCH] RISC-V: Don't add fractional LMUL types to V_VLS for XTheadVector

2024-03-21 Thread Bruce Hoult
> The effect is demonstrated by a new test case that shows that the by-pieces framework now emits `sb` instructions instead of triggering an ICE So these small memset() now don't use RVV at all if xtheadvector is enabled? I don't have evidence whether the use of RVV (whether V or xtheadvector)

Re: [PATCH] RISC-V: Don't add fractional LMUL types to V_VLS for XTheadVector

2024-03-21 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: Christoph Müllner Date: 2024-03-22 07:45 To: gcc-patches; Kito Cheng; Palmer Dabbelt; Andrew Waterman; Philipp Tomsich; Camel Coder; Bruce Hoult; Juzhe-Zhong; Jun Sha; Xianmiao Qu; Jin Ma CC: Christoph Müllner Subject: [PATCH] RISC-V: Don't add fractional

[PATCH] RISC-V: Don't add fractional LMUL types to V_VLS for XTheadVector

2024-03-21 Thread Christoph Müllner
The expansion of `memset` (via expand_builtin_memset_args()) uses clear_by_pieces() and store_by_pieces() to avoid calls to the C runtime. To check if a type can be used for that purpose the function by_pieces_mode_supported_p() tests if a `mov` and a `vec_duplicate` INSN can be expaned by the