[PATCH] RISC-V: Enhance RVV VLA SLP auto-vectorization

2023-06-25 Thread Juzhe-Zhong
Currently, we are able to generate step vector with base == 0: { 0, 0, 2, 2, 4, 4, ... } ASM: vid vand However, we do wrong for step vector with base != 0: { 1, 1, 3, 3, 5, 5, ... } Before this patch, such case will run fail. After this patch, we are able to pass the testcase and generate the

Re: Re: [PATCH] DSE: Add LEN_MASK_STORE analysis into DSE

2023-06-25 Thread juzhe.zh...@rivai.ai
Hi, Richi. >> please use the accessors for the mask/len operand number where available. >>Also I think this shows the existing IFN_LEN_STORE support is bogus >>since the LEN argument isn't guaranteed to be constant. Can you >>fix this as well please? If the length isn't constant the code shoul

Re: [PATCH] DSE: Add LEN_MASK_STORE analysis into DSE

2023-06-25 Thread Richard Biener via Gcc-patches
On Fri, 23 Jun 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Add LEN_MASK_STORE. > (dse_optimize_stmt): Ditto. > > --- > gcc/tree-ssa-dse.cc | 18 ++ > 1 file changed, 18 insertions(

[RFC] GNU Vector Extension -- Packed Boolean Vectors

2023-06-25 Thread Tejas Belagod via Gcc-patches
Hi, Packed Boolean Vectors -- I'd like to propose a feature addition to GNU Vector extensions to add packed boolean vectors (PBV). This has been discussed in the past here[1] and a variant has been implemented in Clang recently[2]. With predication features being added to v

Re: [PATCHv4, rs6000] Splat vector small V2DI constants with ISA 2.07 instructions [PR104124]

2023-06-25 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2023/6/25 10:09, HAO CHEN GUI wrote: > Hi, > This patch adds a new insn for vector splat with small V2DI constants on P8. > If the value of constant is in RANGE (-16, 15) and not 0 or -1, it can be > loaded > with vspltisw and vupkhsw on P8. It should be efficient than loading ve

Re: [PATCH] i386: Sync tune_string with arch_string for target attribute arch=*

2023-06-25 Thread Uros Bizjak via Gcc-patches
On Mon, Jun 26, 2023 at 4:31 AM Hongyu Wang wrote: > > Hi, > > For function with target attribute arch=*, current logic will set its > tune to -mtune from command line so all target_clones will get same > tuning flags which would affect the performance for each clone. Override > tune with arch if

Re: [PATCH 0/9] vect: Move costing next to the transform for vect load

2023-06-25 Thread Kewen.Lin via Gcc-patches
Hi, I'd like to gentle ping this patch series: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621460.html BR, Kewen on 2023/6/13 10:03, Kewen Lin via Gcc-patches wrote: > This patch series follows Richi's suggestion at the link [1], > which suggest structuring vectorizable_load to make cos

Re: [PATCH] Move substitute_and_fold over to use simple_dce_from_worklist

2023-06-25 Thread Jan-Benedict Glaw
Hi Andrew, On Fri, 2023-05-05 08:17:19 -0700, Andrew Pinski via Gcc-patches wrote: > While looking into a different issue, I noticed that it > would take until the second forwprop pass to do some > forward proping and it was because the ssa name was > used more than once but the second statement

Re: [PATCH] RISC-V: Add an experimental vector calling convention

2023-06-25 Thread Lehua Ding
Hi Juzhe, Thanks for taking the time to review the code. I will address comments 1, 2, 3. For comment 4, it is necessary to implement these hooks. The purpose is to mark functions that use vector registers to pass arguments and return value so that they can be recognized by the linker. Send the V

[PATCH] RISC-V: Remove redundant vcond patterns

2023-06-25 Thread Juzhe-Zhong
Previously, Richi has suggested that vcond patterns are only needed when target support comparison + select consuming 1 instruction. Now, I do the experiments on removing those "vcond" patterns, it works perfectly. All testcases PASS. Really appreicate Richi helps us recognize such issue. Now

[PATCH] SSCV: Add LEN_MASK_STORE into SCCVN

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, this patch is to add LEN_MASK_STORE into SCCVN. LEN_MASK_STORE is predicated by both len and mask together. My understanding is that LEN_MASK_STORE has same rhs_off and offset as MASK_STORE. The size = MIN (length (deduced from mask), (len + bias)). Not sure my understan

[PATCH] i386: Relax inline requirement for functions with different target attrs

2023-06-25 Thread Hongyu Wang via Gcc-patches
Hi, For function with different target attributes, current logic rejects to inline the callee when any arch or tune is mismatched. Relax the condition to honor just prefer_vecotr_width_type and other flags that may cause safety issue so caller can get more optimization opportunity. Bootstrapped/r

[PATCH] SCCVN: Fix repeating variable name "len"

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong Line 3292: has variable name "len": tree mask = NULL_TREE, len = NULL_TREE, bias = NULL_TREE; Line 3349: has variable name "len": HOST_WIDE_INT start = 0, len = 0; Since they are never used simultaneously, such issue is not recognized for now. However, I want to add LEN_MASK_

[PATCH] i386: Sync tune_string with arch_string for target attribute arch=*

2023-06-25 Thread Hongyu Wang via Gcc-patches
Hi, For function with target attribute arch=*, current logic will set its tune to -mtune from command line so all target_clones will get same tuning flags which would affect the performance for each clone. Override tune with arch if tune was not explicitly specified to get proper tuning flags for

Re: Re: [PATCH 1/2] allow target to check shrink-wrap-separate enabled or not

2023-06-25 Thread Fei Gao
hi Jeff Please see my earlier reply here. https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg310656.html Maybe you scrolled past it in so many emails:) BR,  Fei On 2023-06-25 21:36  Jeff Law wrote: > > > >On 6/20/23 03:40, Fei Gao wrote: >> gcc/ChangeLog: >> >>  * shrink-wrap.cc

[committed] d: Suboptimal codegen for __builtin_expect(cond, false)

2023-06-25 Thread Iain Buclaw via Gcc-patches
Hi, Since PR96435, both boolean objects and expressions have been evaluated in the following way by the D front-end. (*(ubyte*)&obj_or_expr) & 1 It has been noted that sometimes this can cause the back-end to optimize in non-obvious ways - in particular with __builtin_expect. This @safe fea

[PATCH V2] DSE: Add LEN_MASK_STORE analysis into DSE

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Add LEN_MASK_STORE. (dse_optimize_stmt): Ditto. --- gcc/tree-ssa-dse.cc | 27 +++ 1 file changed, 27 insertions(+) diff --git a/gcc/tree-ssa-dse.cc b/gcc/tree-ssa-dse.cc in

[PATCH] GIMPLE_FOLD: Fix gimple fold for LEN_MASK_{LOAD,STORE}

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, previous I made a mistake on GIMPLE_FOLD of LEN_MASK_{LOAD,STORE}. We should fold LEN_MASK_{LOAD,STORE} (bias+len) == vf (nunits instead of bytesize) && mask = all trues mask into: MEM_REF [...]. This patch added testcase to test gimple fold of LEN_MASK_{LOAD,STORE}.

Re: [PATCH 3/3] [aarch64] Adjust testcase to match assembly output after r14-2007.

2023-06-25 Thread Hongtao Liu via Gcc-patches
On Mon, Jun 26, 2023 at 9:31 AM liuhongt via Gcc-patches wrote: > > The new assembly looks better than original one, so I adjust those testcases. > Ok for trunk? > > gcc/testsuite/ChangeLog: > > PR tree-optimization/110371 > PR tree-optimization/110018 > * gcc.target/aarch6

[PATCH 1/3] Use cvt_op to save intermediate type operand instead of "subtle" vec_dest.

2023-06-25 Thread liuhongt via Gcc-patches
When there're multiple operands in vec_oprnds0, vec_dest will be overwrited to vectype_out, but in multi_step_cvt case, cvt_type is expected. It caused an ICE when verify_gimple_in_cfg. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,} and aarch64-linux-gnu. Ok for trunk? gcc/ChangeLog:

[PATCH 3/3] [aarch64] Adjust testcase to match assembly output after r14-2007.

2023-06-25 Thread liuhongt via Gcc-patches
The new assembly looks better than original one, so I adjust those testcases. Ok for trunk? gcc/testsuite/ChangeLog: PR tree-optimization/110371 PR tree-optimization/110018 * gcc.target/aarch64/sve/unpack_fcvt_signed_1.c: Scan scvt + sxtw instead of scvt + zip1 + z

[PATCH 2/3] Don't use intermiediate type for FIX_TRUNC_EXPR when ftrapping-math.

2023-06-25 Thread liuhongt via Gcc-patches
> > Hmm, good question. GENERIC has a direct truncation to unsigned char > > for example, the C standard generally says if the integral part cannot > > be represented then the behavior is undefined. So I think we should be > > safe here (0x1.0p32 doesn't fit an int). > > We should be following An

[GCC13][committed] d: Fix crash in d/dmd/root/aav.d:127 dmd_aaGetRvalue from DsymbolTable::lookup (PR110113)

2023-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This backports patch from upstream dmd mainline for fixing PR110113. The data being Mem.xrealloc'd contains many Array(T) fields, some of which have self references in their data.ptr field thanks to the smallarray optimization used by Array. Naturally then, the memcpy from old GC data to new

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-25 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 9:35 PM Jan Beulich wrote: > > On 25.06.2023 09:30, Hongtao Liu wrote: > > On Sun, Jun 25, 2023 at 3:23 PM Hongtao Liu wrote: > >> > >> On Sun, Jun 25, 2023 at 3:13 PM Hongtao Liu wrote: > >>> > >>> On Sun, Jun 25, 2023 at 1:52 PM Jan Beulich wrote: > > On 25.0

[committed] d: Merge upstream dmd, druntime a45f4e9f43, phobos 106038f2e.

2023-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end and run-time library with upstream dmd 5f7552bb28, and standard library with phobos 106038f2e. Synchronizing with the latest bug fixes in the v2.103.1 release. D front-end changes: - Import dmd v2.103.1. - Deprecated invalid special token se

Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.

2023-06-25 Thread Stefan O'Rear via Gcc-patches
On Sun, Jun 25, 2023, at 8:49 AM, Jeff Law wrote: > On 6/24/23 19:40, Stefan O'Rear wrote: >> On Sat, Jun 24, 2023, at 11:01 AM, Jeff Law via Gcc-patches wrote: >>> On 6/21/23 02:14, Wang, Yanzhang wrote: Hi Jeff, sorry for the late reply. > The long branch handling is done at the ass

Re: [PATCH v5 3/5] p1689r5: initial support

2023-06-25 Thread Ben Boeckel via Gcc-patches
On Fri, Jun 23, 2023 at 14:31:17 -0400, Jason Merrill wrote: > On 6/20/23 15:46, Ben Boeckel wrote: > > On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: > >> On 1/25/23 13:06, Ben Boeckel wrote: > > >>> Header units (including the standard library headers) are 100% > >>> unsupported ri

Re: [PATCH v5 5/5] c++modules: report module mapper files as a dependency

2023-06-25 Thread Ben Boeckel via Gcc-patches
On Fri, Jun 23, 2023 at 10:44:11 -0400, Jason Merrill wrote: > On 1/25/23 16:06, Ben Boeckel wrote: > > It affects the build, and if used as a static file, can reliably be > > tracked using the `-MF` mechanism. > > Hmm, this seems a bit like making all .o depend on the Makefile; it Technically t

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-06-25 Thread Ben Boeckel via Gcc-patches
On Fri, Jun 23, 2023 at 08:12:41 -0400, Nathan Sidwell wrote: > On 6/22/23 22:45, Ben Boeckel wrote: > > On Thu, Jun 22, 2023 at 17:21:42 -0400, Jason Merrill wrote: > >> On 1/25/23 16:06, Ben Boeckel wrote: > >>> They affect the build, so report them via `-MF` mechanisms. > >> > >> Why isn't this

Re: [PATCH] Improve DSE to handle stores before __builtin_unreachable ()

2023-06-25 Thread Jan Hubicka via Gcc-patches
> > Also as discussed some time ago, the volatile loads between traps has > > effect of turning previously pure/const functions into non-const which > > is somewhat sad, so it is still on my todo list to change it this stage1 > > to something more careful. We discussed internal functions trap_sto

RE: [PATCH v2] RISC-V: fix expand function of vlmul_ext RVV intrinsic

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:55 PM To: juzhe.zh...@rivai.ai; Li Xu ; gcc-patches Cc: kito.cheng ; palmer ; zhengyu Subject: Re: [PATCH v2] RISC-V: fix expand function of vlmul_ext

Re: [PATCH] RISC-V: Add an experimental vector calling convention

2023-06-25 Thread 钟居哲
Thanks for doing this. A couple comments here: 1. -riscv_init_cumulative_args (CUMULATIVE_ARGS *cum, - tree fntype ATTRIBUTE_UNUSED, - rtx libname ATTRIBUTE_UNUSED, - tree fndecl, +riscv_init_cumulative_args (CUMULATIV

RE: [PATCH] RISC-V: Optimize VSETVL codegen of SELECT_VL with LEN_MASK_{LOAD,STORE}

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:57 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; rdapp@gmail

RE: [PATCH V2] RISC-V: Enable len_mask{load, store} and remove len_{load, store}

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:53 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; rdapp@gmail

RE: [PATCH] internal-fn: Fix bug of BIAS argument index

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:48 PM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: richard.sandif...@arm.com; rguent...@suse.de Subject: Re: [PATCH] internal-fn: Fix bug of BIAS

Re: [PATCH 1/2] allow target to check shrink-wrap-separate enabled or not

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/20/23 03:40, Fei Gao wrote: gcc/ChangeLog: * shrink-wrap.cc (try_shrink_wrapping_separate):call use_shrink_wrapping_separate. (use_shrink_wrapping_separate): wrap the condition check in use_shrink_wrapping_separate. * shrink-wrap.h (use_sh

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-25 Thread Jan Beulich via Gcc-patches
On 25.06.2023 09:30, Hongtao Liu wrote: > On Sun, Jun 25, 2023 at 3:23 PM Hongtao Liu wrote: >> >> On Sun, Jun 25, 2023 at 3:13 PM Hongtao Liu wrote: >>> >>> On Sun, Jun 25, 2023 at 1:52 PM Jan Beulich wrote: On 25.06.2023 06:42, Hongtao Liu wrote: > On Wed, Jun 21, 2023 at 2:26 PM

[PING][RISCV] [PR target/110201] Fix operand types for various scalar crypto insns

2023-06-25 Thread Jeff Law via Gcc-patches
Ping. With RISCV tag this time. Forwarded Message Subject: [PR target/110201] Fix operand types for various scalar crypto insns Date: Mon, 19 Jun 2023 16:34:28 -0600 From: Jeff Law To: gcc-patches@gcc.gnu.org A handful of the scalar crypto instructions are supposed to t

Re: [PATCH] cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/22/23 05:11, Philipp Tomsich wrote: From: Manolis Tsamis Fixes: 6a2e8dcbbd4bab3 Propagation for the stack pointer in regcprop was enabled in 6a2e8dcbbd4bab3, but set ORIGINAL_REGNO/REG_ATTRS/REG_POINTER for stack_pointer_rtx which caused regression (e.g., PR 110313, PR 110308). This f

Re: [PATCH] RISC-V: Optimize VSETVL codegen of SELECT_VL with LEN_MASK_{LOAD,STORE}

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/25/23 06:20, Juzhe-Zhong wrote: This patch is depending on LEN_MASK_{LOAD,STORE} patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622742.html After enabling the LEN_MASK_{LOAD,STORE}, I notice that there is a case that VSETVL PASS need to be optimized: void f (int32_t *__rest

Re: [PATCH v2] RISC-V: fix expand function of vlmul_ext RVV intrinsic

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/25/23 03:13, juzhe.zh...@rivai.ai wrote: LGTM. Thanks for fixing it. Agreed. I didn't see the V2 had already been posted. Hi, Jeff: I saw Li Xu is frequently helping RVV support in GCC. Is it possible to give him the write access? Yes, we can do that with the normal process. Li Xu

Re: [PATCH V2] RISC-V: Enable len_mask{load, store} and remove len_{load, store}

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/25/23 02:39, Juzhe-Zhong wrote: This patch enable len_mask_{load,store} to support flow-control in RVV auto-vectorization. Consider this following case: void f (int32_t *__restrict a, int32_t *__restrict b, int32_t *__restrict cond, int n) { for (int i = 0; i < n; i++)

Re: [PATCH] RISC-V: force arg and target to reg rtx under -O0

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/24/23 21:43, juzhe.zh...@rivai.ai wrote: Hi, Li. Appreciate for catching this! I think it's better: -emit_insn (gen_rtx_SET (gen_lowpart (e.vector_mode (), e.target), src)); +emit_move_insn (gen_lowpart (e.vector_mode (), e.target), src); do this to fix this issue. Agreed. Assuming a va

Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/24/23 19:40, Stefan O'Rear wrote: On Sat, Jun 24, 2023, at 11:01 AM, Jeff Law via Gcc-patches wrote: On 6/21/23 02:14, Wang, Yanzhang wrote: Hi Jeff, sorry for the late reply. The long branch handling is done at the assembler level. So the clobbering of $ra isn't visible to the compi

Re: [PATCH] internal-fn: Fix bug of BIAS argument index

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/24/23 21:36, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong When trying to enable LEN_MASK_{LOAD,STORE} in RISC-V port, I found I made a mistake in case of argument index of BIAS. This patch is an obvious fix, Ok for trunk ? gcc/ChangeLog: * internal-fn.cc (expand_partial_s

[PATCH] RISC-V: Add an experimental vector calling convention

2023-06-25 Thread Lehua Ding
This patch adds an experimental vector calling convention proposal that the user can enable with --param=riscv-vector-abi option. The details of this proposal can be viewed at this link: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/389 . Please help me to review this proposal, thank y

[PATCH] RISC-V: Optimize VSETVL codegen of SELECT_VL with LEN_MASK_{LOAD, STORE}

2023-06-25 Thread Juzhe-Zhong
This patch is depending on LEN_MASK_{LOAD,STORE} patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622742.html After enabling the LEN_MASK_{LOAD,STORE}, I notice that there is a case that VSETVL PASS need to be optimized: void f (int32_t *__restrict a, int32_t *__restrict b, int32

[PATCH] modula-2: Amend the handling of failed select() calls in RTint [PR108835].

2023-06-25 Thread Iain Sandoe via Gcc-patches
Tested on various affected Darwin versions and on x86_64-linux-gnu OK for trunk? OK for 13.2? thanks Iain --- 8< --- When we make a select() that fails, there is an attempt to (a) diagnose why and (b) make a fallback. These actions are causing some tests to hang on some Darwin versions, this is

[committed] MAINTAINERS: Add myself to write after approval

2023-06-25 Thread Lehua Ding
ChangeLog: * MAINTAINERS: Add Lehua Ding to write after approval --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4825ee449ae..bac773ad0af 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -394,6 +394,7 @@ Chris Demetriou

[pushed] configure, Darwin: Ensure overrides to host-pie are passed to gcc configure.

2023-06-25 Thread Iain Sandoe via Gcc-patches
Tested on i686, powerpc, x86_64 and aarch64 darwin (for versions requiring PIE and also some that default to non-PIE). Also tested on x86_64-linux-gnu with and without --enable-host-pie. pushed to master, thanks Iain --- 8< --- The latest versions of Darwin on the Aarch64 platform mandate PIE

Re: [PATCH v2] RISC-V: fix expand function of vlmul_ext RVV intrinsic

2023-06-25 Thread juzhe.zh...@rivai.ai
LGTM. Thanks for fixing it. Hi, Jeff: I saw Li Xu is frequently helping RVV support in GCC. Is it possible to give him the write access? Thanks. juzhe.zh...@rivai.ai From: Li Xu Date: 2023-06-25 17:09 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; zhengyu; Li Xu Subject: [PATCH v2] RIS

[PATCH v2] RISC-V: fix expand function of vlmul_ext RVV intrinsic

2023-06-25 Thread Li Xu
Consider this following case: void test_vlmul_ext_v_i8mf8_i8mf4(vint8mf8_t op1) { vint8mf4_t res = __riscv_vlmul_ext_v_i8mf8_i8mf4(op1); } Compilation fails with: test.c: In function 'test_vlmul_ext_v_i8mf8_i8mf4': test.c:5:1: error: unrecognizable insn: 5 | } | ^ (insn 30 29 0 2 (set

[PATCH V2] RISC-V: Enable len_mask{load, store} and remove len_{load, store}

2023-06-25 Thread Juzhe-Zhong
This patch enable len_mask_{load,store} to support flow-control in RVV auto-vectorization. Consider this following case: void f (int32_t *__restrict a, int32_t *__restrict b, int32_t *__restrict cond, int n) { for (int i = 0; i < n; i++) if (cond[i]) a[i] = b[i]; } Before th

[PATCH] RISC-V: Enable len_mask{load, store} and remove len_{load, store}

2023-06-25 Thread Juzhe-Zhong
This patch enable len_mask_{load,store} to support flow-control in RVV auto-vectorization. Consider this following case: void f (int32_t *__restrict a, int32_t *__restrict b, int32_t *__restrict cond, int n) { for (int i = 0; i < n; i++) if (cond[i]) a[i] = b[i]; } Before th

Re: [x86_PATCH] New *ashl_doubleword_highpart define_insn_and_split.

2023-06-25 Thread Uros Bizjak via Gcc-patches
On Sat, Jun 24, 2023 at 8:04 PM Roger Sayle wrote: > > > This patch contains a pair of (related) optimizations in i386.md that > allow us to generate better code for the example below (this is a step > towards fixing a bugzilla PR, but I've forgotten the number). > > __int128 foo64(__int128 x, lon

RE: [PATCH V1] RISC-V:Add float16 tuple type support

2023-06-25 Thread Li, Pan2 via Gcc-patches
Sure, reverted and will commit this patch after the issue addressed. Pan -Original Message- From: Andreas Schwab Sent: Sunday, June 25, 2023 3:22 PM To: juzhe.zh...@rivai.ai Cc: yulong ; gcc-patches ; palmer ; Kito.cheng ; Jim Wilson ; Li, Pan2 ; wuwei2016 ; jiawei ; shihua ; dje.gc

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-25 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 3:23 PM Hongtao Liu wrote: > > On Sun, Jun 25, 2023 at 3:13 PM Hongtao Liu wrote: > > > > On Sun, Jun 25, 2023 at 1:52 PM Jan Beulich wrote: > > > > > > On 25.06.2023 06:42, Hongtao Liu wrote: > > > > On Wed, Jun 21, 2023 at 2:26 PM Jan Beulich via Gcc-patches > > > > wr

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-25 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 3:13 PM Hongtao Liu wrote: > > On Sun, Jun 25, 2023 at 1:52 PM Jan Beulich wrote: > > > > On 25.06.2023 06:42, Hongtao Liu wrote: > > > On Wed, Jun 21, 2023 at 2:26 PM Jan Beulich via Gcc-patches > > > wrote: > > >> > > >> +(define_code_iterator andor [and ior]) > > >> +(

Re: [PATCH V1] RISC-V:Add float16 tuple type support

2023-06-25 Thread Andreas Schwab
Please revert until bootstrap is restored. -- 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."

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-25 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 1:52 PM Jan Beulich wrote: > > On 25.06.2023 06:42, Hongtao Liu wrote: > > On Wed, Jun 21, 2023 at 2:26 PM Jan Beulich via Gcc-patches > > wrote: > >> > >> +(define_code_iterator andor [and ior]) > >> +(define_code_attr nlogic [(and "nor") (ior "nand")]) > >> +(define_code