Re: [PATCHv4, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-23 Thread HAO CHEN GUI
Hi Hongtao, 在 2024/8/23 11:47, Hongtao Liu 写道: > On Fri, Aug 23, 2024 at 11:03 AM HAO CHEN GUI wrote: >> >> Hi Hongtao, >> >> 在 2024/8/23 9:47, Hongtao Liu 写道: >>> On Thu, Aug 22, 2024 at 4:06 PM HAO CHEN GUI wrote: >>>> >>>> Hi Hon

Re: [PATCHv4, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-22 Thread HAO CHEN GUI
Hi Hongtao, 在 2024/8/23 9:47, Hongtao Liu 写道: > On Thu, Aug 22, 2024 at 4:06 PM HAO CHEN GUI wrote: >> >> Hi Hongtao, >> >> 在 2024/8/21 11:21, Hongtao Liu 写道: >>> r15-3058-gbb42c551905024 support const0 operand for movv16qi, please >>> rebase your p

Re: [PATCHv4, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-22 Thread HAO CHEN GUI
Hi Hongtao, 在 2024/8/21 11:21, Hongtao Liu 写道: > r15-3058-gbb42c551905024 support const0 operand for movv16qi, please > rebase your patch and see if there's still the regressions. There's still regressions. The patch enables V16QI const0 store, but it also enables V8QI const0 store. The vector mo

Re: [PATCHv4, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-19 Thread HAO CHEN GUI
Hi, Add Hongtao Liu as the patch affects x86. 在 2024/8/20 6:32, Richard Sandiford 写道: > HAO CHEN GUI writes: >> Hi, >> This patch adds const0 move checking for CLEAR_BY_PIECES. The original >> vec_duplicate handles duplicates of non-constant inputs. But 0 is a >> c

Re: [PATCHv2, aarch64] Implement 16-byte vector mode const0 store by TImode

2024-08-18 Thread HAO CHEN GUI
No regressions are reported. Committed as r15-3013. https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/408072.html Thanks Gui Haochen 在 2024/8/16 10:31, HAO CHEN GUI 写道: > Hi, > I submitted a patch to change the mode checking for > CLEAR_BY_PIECES. > https://gcc.gnu.org/pipermail

[PATCHv4, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-18 Thread HAO CHEN GUI
Hi, This patch adds const0 move checking for CLEAR_BY_PIECES. The original vec_duplicate handles duplicates of non-constant inputs. But 0 is a constant. So even a platform doesn't support vec_duplicate, it could still do clear by pieces if it supports const0 move by that mode. Compared to the

[PATCH-2] Builtins: Fold isfinite on IBM long double to isfinite on high-order double [PR97786]

2024-08-16 Thread HAO CHEN GUI
Hi, This patch folds builtin_isfinite on IBM long double to builtin_isfinite on its high-order double. The isfinite_optab was already implemented in this patch. https://gcc.gnu.org/g:44eb45c2ef7192eb6a811fd46fcb2c7fbeb6f865 Bootstrapped and tested on powerpc64-linux BE and LE with no regres

[PATCH-1] Builtins: Fold isinf on IBM long double to isinf on high-order double [PR97786]

2024-08-16 Thread HAO CHEN GUI
Hi, This patch folds builtin_isinf on IBM long double to builtin_isinf on its high-order double. The isinf_optab was already implemented in this patch. https://gcc.gnu.org/g:53945be1efb502f235d84ff67ceafe4a764b6e1c Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is

[PATCHv2, aarch64] Implement 16-byte vector mode const0 store by TImode

2024-08-15 Thread HAO CHEN GUI
Hi, I submitted a patch to change the mode checking for CLEAR_BY_PIECES. https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660344.html It causes some regressions on aarch64. With the patch, V2x8QImode is used to do clear by pieces instead of TImode as vector mode is preferable and V2x8QImo

Re: [PATCHv3, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-15 Thread HAO CHEN GUI
Hi Richard, It's a good point. I will test it. Thanks a lot. Thanks Gui Haochen 在 2024/8/15 17:50, Richard Sandiford 写道: > HAO CHEN GUI writes: >> Hi, >> This patch adds const0 move checking for CLEAR_BY_PIECES. The original >> vec_duplicate handles duplicates of

Re: [PATCH-1v4] Value Range: Add range op for builtin isinf

2024-08-14 Thread HAO CHEN GUI
Hi All, These three value range patches were committed as r15-2922, r15-2923 and r15-2924. Thanks Gui Haochen 在 2024/8/15 5:46, Jeff Law 写道: > > > On 8/14/24 12:38 PM, Sam James wrote: >> Vineet Gupta writes: >> >>> Ping - looks like this is blocking the patches for builtin_isnormal and >>

Re: Ping^4 [PATCH-2v4] Value Range: Add range op for builtin isfinite

2024-08-14 Thread HAO CHEN GUI
me of the arch patches might be waiting on this. > > Thx, > -Vineet > > On 8/5/24 07:59, Jeff Law wrote: >> On 7/21/24 8:10 PM, HAO CHEN GUI wrote: >>> Hi, >>>Gently ping it. >>> https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html >> OK. Sorry for the delays.

Re: [PATCH-1v4] Value Range: Add range op for builtin isinf

2024-08-14 Thread HAO CHEN GUI
Hi Jeff, May I know your final decision on this patch? https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656937.html Thanks Gui Haochen 在 2024/8/5 22:51, Jeff Law 写道: > > > On 7/23/24 4:39 PM, Andrew MacLeod wrote: >> the range is in r, and is set to [0,0].  this is the false part of what

[RFC][PATCH, aarch64] Implement 16-byte vector mode const0 store by TImode

2024-08-13 Thread HAO CHEN GUI
Hi, I submitted a patch to change the mode checking for CLEAR_BY_PIECES. https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660344.html It causes some regressions on aarch64. With the patch, V2x8QImode is used to do clear by pieces instead of TImode as vector mode is preferable and V2x8QImo

[PATCHv3, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-13 Thread HAO CHEN GUI
Hi, This patch adds const0 move checking for CLEAR_BY_PIECES. The original vec_duplicate handles duplicates of non-constant inputs. But 0 is a constant. So even a platform doesn't support vec_duplicate, it could still do clear by pieces if it supports const0 move by that mode. Compared to the

Re: [PATCHv2, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-06 Thread HAO CHEN GUI
Hi Jeff, 在 2024/8/5 23:11, Jeff Law 写道: > We'll probably need Richard S. or someone else to chime in on the actual > patch, but yea, if they can leverage stp, it's likely going to be better than  > actual vectors. > > Do we have a testcase for this issue or was it something you just happened to 

Re: [PATCH, rs6000] Add const_vector into any_operand predicate

2024-08-05 Thread HAO CHEN GUI
Thanks for reviewing the patch. Committed as r15-2740. 在 2024/7/31 17:10, Kewen.Lin 写道: > Hi Haochen, > > on 2024/7/25 11:34, HAO CHEN GUI wrote: >> Hi, >> This patch add const_vector into any_operand predicate. From my >> understanding, any_operand should include al

Re: [PATCH-1v4] Value Range: Add range op for builtin isinf

2024-07-29 Thread HAO CHEN GUI
Hi Jeff, Do you have further questions? Thanks Gui Haochen 在 2024/7/24 6:39, Andrew MacLeod 写道: > > On 7/23/24 15:18, Jeff Law wrote: >> >> >> On 7/11/24 9:17 PM, HAO CHEN GUI wrote: >> >>>> So why the test for real_isinf on the upper/lower bound?  I

Re: [PATCHv2, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-07-26 Thread HAO CHEN GUI
Hi Jeff, 在 2024/7/24 5:57, Jeff Law 写道: > > > On 7/21/24 7:58 PM, HAO CHEN GUI wrote: >> Hi, >>    This patch adds const0 move checking for CLEAR_BY_PIECES. The original >> vec_duplicate handles duplicates of non-constant inputs. But 0 is a >> constant. S

[PATCHv3, rs6000] Optimize vector construction with two vector doubleword loads [PR103568]

2024-07-24 Thread HAO CHEN GUI
Hi, This patch optimizes vector construction with two vector doubleword loads. It generates an optimal insn sequence as "xxlor" has lower latency than "mtvsrdd" on Power10. Compared with previous version, the main change is to add new patterns for LE platform. Also lxsd[x] instructions are gua

[PATCH, rs6000] Add const_vector into any_operand predicate

2024-07-24 Thread HAO CHEN GUI
Hi, This patch add const_vector into any_operand predicate. From my understanding, any_operand should include all kinds of operands. The const_vector should be included. As emit_move_insn doesn't check the predicate, the const_vector is actually supported by vector mode move expand. So it should

Ping^4 [PATCH-2v4] Value Range: Add range op for builtin isfinite

2024-07-21 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html Thanks Gui Haochen 在 2024/7/1 9:11, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html > > Thanks > Gui Haochen > > 在 2024/6/

Ping^4 [PATCH-3v2] Value Range: Add range op for builtin isnormal

2024-07-21 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653095.html Thanks Gui Haochen 在 2024/7/1 9:12, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653095.html > > Thanks > Gui Haochen > > 在 2024/6/

Ping [PATCH-1v4] Value Range: Add range op for builtin isinf

2024-07-21 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656937.html Thanks Gui Haochen 在 2024/7/11 15:32, HAO CHEN GUI 写道: > Hi, > The builtin isinf is not folded at front end if the corresponding optab > exists. It causes the range evaluation failed on the targets

[PATCHv2, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-07-21 Thread HAO CHEN GUI
Hi, This patch adds const0 move checking for CLEAR_BY_PIECES. The original vec_duplicate handles duplicates of non-constant inputs. But 0 is a constant. So even a platform doesn't support vec_duplicate, it could still do clear by pieces if it supports const0 move by that mode. Compared to the

[PATCH-3v5, rs6000] Implement optab_isnormal for SFDF and IEEE128

2024-07-17 Thread HAO CHEN GUI
Hi, This patch implemented optab_isnormal for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to merge the patterns of SFDF and IEEE128 into one. https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655781.html Bootstrapped and tested on p

[PATCH-2v5, rs6000] Implement optab_isfinite for SFDF and IEEE128

2024-07-17 Thread HAO CHEN GUI
Hi, This patch implemented optab_isfinite for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to merge the patterns of SFDF and IEEE128 into one. https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655780.html Bootstrapped and tested on p

[PATCH, rs6000] Remove redundant guard for float128 mode patterns

2024-07-14 Thread HAO CHEN GUI
Hi, This patch removes FLOAT128_IEEE_P guard when the mode of pattern is IEEE128 and FLOAT128_IBM_P when the mode of pattern is IBM128. The mode iterators already do the checking. So they're redundant. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is it OK for trunk

[PATCHv2, rs6000] Add TARGET_FLOAT128_HW guard for quad-precision insns

2024-07-14 Thread HAO CHEN GUI
Hi, This patch adds TARGET_FLOAT128_HW into pattern conditions for quad- precision insns. Some qp patterns are guarded by TARGET_P9_VECTOR originally, so replace it with "TARGET_FLOAT128_HW". For test case float128-cmp2-runnable.c, it should be guarded with ppc_float128_hw as it calls qp insns

Re: [PATCH-1v4] Value Range: Add range op for builtin isinf

2024-07-11 Thread HAO CHEN GUI
Hi Jeff, Thanks for your comments. 在 2024/7/12 6:13, Jeff Law 写道: > > > On 7/11/24 1:32 AM, HAO CHEN GUI wrote: >> Hi, >>    The builtin isinf is not folded at front end if the corresponding optab >> exists. It causes the range evaluation failed on the targets wh

Re: [PATCH, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-07-11 Thread HAO CHEN GUI
Hi Jeff, 在 2024/7/11 6:25, Jeff Law 写道: > OK.  But given this patch is several months old, can you re-bootstrap & test  > before committing to the trunk. Thanks. I will rebase the patch and test it again. Thanks Gui Haochen

Re: Ping^3 [PATCH-1v3] Value Range: Add range op for builtin isinf

2024-07-11 Thread HAO CHEN GUI
Hi Ruoyao, Thanks for your info. I updated my patch and sent it for review. Thanks Gui Haochen 在 2024/7/10 22:01, Xi Ruoyao 写道: > On Wed, 2024-07-10 at 21:54 +0800, Xi Ruoyao wrote: >> On Mon, 2024-07-01 at 09:11 +0800, HAO CHEN GUI wrote: >>> Hi, >>>   Gently ping

[PATCH-1v4] Value Range: Add range op for builtin isinf

2024-07-11 Thread HAO CHEN GUI
Hi, The builtin isinf is not folded at front end if the corresponding optab exists. It causes the range evaluation failed on the targets which has optab_isinf. For instance, range-sincos.c will fail on the targets which has optab_isinf as it calls builtin_isinf. This patch fixed the problem by

[PATCH, rs6000] Add TARGET_FLOAT128_HW guard for quad-precision insns

2024-07-10 Thread HAO CHEN GUI
Hi, This patch adds TARGET_FLOAT128_HW into pattern conditions for quad- precision insns. Also it removes FLOAT128_IEEE_P check from pattern conditions if the mode of pattern is IEEE128 as the mode iterator - IEEE128 already checks with FLOAT128_IEEE_P. For test case float128-cmp2-runnable.c,

Re: [PATCH] Expand: Pass down equality only flag to cmpmem expand

2024-07-09 Thread HAO CHEN GUI
Hi Jeff, 在 2024/7/10 7:35, Jeff Law 写道: > Is this patch still relevant?  It was submitted after stage1 closed for > gcc-14.  With the trunk open for development, you should probably rebase and  > repost if the patch is still relevant/useful. > > Conceptually knowing that we just want to do an eq

Re: [PATCH v2] RISC-V: use fclass insns to implement isfinite and isnormal builtins

2024-07-09 Thread HAO CHEN GUI
Hi, 在 2024/7/10 8:04, Vineet Gupta 写道: > So it seems initial versions of the patch didn't specify anything about > output mode. Richi asked for it in review and in v4 Hao added it. > But I don't see anyone asking specifically for SImode. > I guess that can be relaxed. Hao do you have any inputs he

[PATCH-1v5, rs6000] Implement optab_isinf for SFDF and IEEE128

2024-07-09 Thread HAO CHEN GUI
Hi, This patch implemented optab_isinf for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main changes are: 1 Define 3 mode attributes which are used for predicate, constraint and asm print selection. They help merge sp/dp/qp patterns to one. 2 Remove ori

Ping^2 [PATCHv2, rs6000] Optimize vector construction with two vector doubleword loads [PR103568]

2024-07-01 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653180.html Thanks Gui Haochen 在 2024/6/20 15:01, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653180.html > > Thanks > Gui Haochen > > 在 2024/5/3

Ping^3 [PATCH-2v4] Value Range: Add range op for builtin isfinite

2024-07-01 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html Thanks Gui Haochen 在 2024/6/24 9:41, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html > > Thanks > Gui Haochen > > 在 2024/6/2

Ping^3 [PATCH-3v2] Value Range: Add range op for builtin isnormal

2024-07-01 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653095.html Thanks Gui Haochen 在 2024/6/24 9:41, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653095.html > > Thanks > Gui Haochen > > 在 2024/6/2

Re: [PATCH] RISC-V: use fclass insns to implement isfinite and isnormal builtins

2024-07-01 Thread HAO CHEN GUI
>   return std::isfinite (x); > } > > generating the new seq > > .LFB4: >     fclass.d    a0,fa0 >     andi    a0,a0,126 >     snez    a0,a0 >     ret > > vs. > >     li    a0,1 >     ret > > I have a hunch this requires the pending value range patch from Hao Chen > GUI. > > Thx, > -Vineet > > [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html

Ping^3 [PATCH-1v3] Value Range: Add range op for builtin isinf

2024-07-01 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653096.html Thanks Gui Haochen 在 2024/6/24 9:40, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653096.html > > Thanks > Gui Haochen > > 在 2024/6/2

[PATCH-2v4, rs6000] Implement optab_isfinite for SFDF and IEEE128

2024-06-26 Thread HAO CHEN GUI
Hi, This patch implemented optab_isfinite for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to use the constant mask for test data class insns. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652594.html Bootstrapped and tested on po

[PATCH-3v4, rs6000] Implement optab_isnormal for SFDF and IEEE128

2024-06-26 Thread HAO CHEN GUI
Hi, This patch implemented optab_isnormal for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to use the constant mask for test data class insns. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652595.html Bootstrapped and tested on po

[PATCH-1v4, rs6000] Implement optab_isinf for SFDF and IEEE128

2024-06-26 Thread HAO CHEN GUI
Hi, This patch implemented optab_isinf for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to define and use the constant mask for test data class insns. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652593.html Bootstrapped and test

Ping^2 [PATCH-1v3] Value Range: Add range op for builtin isinf

2024-06-24 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653096.html Thanks Gui Haochen 在 2024/6/20 14:56, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653096.html > > Thanks > Gui Haochen > > 在 2024/5/3

Ping^2 [PATCH-2v4] Value Range: Add range op for builtin isfinite

2024-06-24 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html Thanks Gui Haochen 在 2024/6/20 14:57, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html > > Thanks > Gui Haochen > > 在 2024/5/3

Ping^3 [PATCHv5] Optab: add isnormal_optab for __builtin_isnormal

2024-06-24 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653001.html Thanks Gui Haochen 在 2024/6/17 13:30, HAO CHEN GUI 写道: > Hi, > Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653001.html > > Thanks > Gui Haochen > > 在 2024/6/

Re: [PATCH-1v5] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-20 Thread HAO CHEN GUI
Hi Richard, 在 2024/6/20 16:05, Richard Sandiford 写道: > I'm not sure "profitability" means much in the case of debug insns. > There again, I suppose having no limit on the complexity of debug > insns would risk quadraticness and (even without that) would tend > to increase the size of the on-disk d

Ping [PATCHv2, rs6000] Optimize vector construction with two vector doubleword loads [PR103568]

2024-06-20 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653180.html Thanks Gui Haochen 在 2024/5/31 11:25, HAO CHEN GUI 写道: > Hi, > This patch optimizes vector construction with two vector doubleword loads. > It generates an optimal insn sequence as "xxlor"

Re: [PATCH-3v2] Value Range: Add range op for builtin isnormal

2024-06-19 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653095.html Thanks Gui Haochen 在 2024/5/30 10:46, HAO CHEN GUI 写道: > Hi, > This patch adds the range op for builtin isnormal. It also adds two > help function in frange to detect range of normal floating-point an

Re: [PATCH-2v4] Value Range: Add range op for builtin isfinite

2024-06-19 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653094.html Thanks Gui Haochen 在 2024/5/30 10:46, HAO CHEN GUI 写道: > Hi, > This patch adds the range op for builtin isfinite. > > Compared to previous version, the main change is to set the range to > 1

Ping [PATCH-1v3] Value Range: Add range op for builtin isinf

2024-06-19 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653096.html Thanks Gui Haochen 在 2024/5/30 10:46, HAO CHEN GUI 写道: > Hi, > The builtin isinf is not folded at front end if the corresponding optab > exists. It causes the range evaluation failed on the targets

[PATCH-1v5] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-19 Thread HAO CHEN GUI
Hi, This patch replaces rtx_cost with insn_cost in forward propagation. In the PR, one constant vector should be propagated and replace a pseudo in a store insn if we know it's a duplicated constant vector. It reduces the insn cost but not rtx cost. In this case, the cost is determined by destina

Re: [PATCH-1v4] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-18 Thread HAO CHEN GUI
Hi Richard, 在 2024/6/17 17:04, Richard Sandiford 写道: > I don't think we should keep the single_set condition after this change. > insn_cost can handle all instructions. Just tested with removing single_set condition. It causes some regressions. If the new_rtl is a debug insn, it still can do the

[PATCH-1v4] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-17 Thread HAO CHEN GUI
Hi, This patch replaces rtx_cost with insn_cost in forward propagation. In the PR, one constant vector should be propagated and replace a pseudo in a store insn if we know it's a duplicated constant vector. It reduces the insn cost but not rtx cost. In this case, the cost is determined by destina

Ping^2 [PATCHv5] Optab: add isfinite_optab for __builtin_isfinite

2024-06-17 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652991.html Thanks Gui Haochen 在 2024/6/3 10:37, HAO CHEN GUI 写道: > Hi, > All issues were addressed. Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652991.html > > Thanks > Gui Hao

Ping^2 [PATCH-1v3, rs6000] Implement optab_isinf for SFDF and IEEE128

2024-06-17 Thread HAO CHEN GUI
.html [PATCH-3v3, rs6000] Implement optab_isnormal for SFDF and IEEE128 https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652595.html Thanks Gui Haochen 在 2024/6/3 10:40, HAO CHEN GUI 写道: > Hi, > Gently ping the series of patches. > [PATCH-1v3, rs6000] Implement optab_isinf for SFDF an

Ping^2 [PATCHv5] Optab: add isnormal_optab for __builtin_isnormal

2024-06-17 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653001.html Thanks Gui Haochen 在 2024/6/3 10:37, HAO CHEN GUI 写道: > Hi, > All issues were addressed. Gently ping it. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653001.html > > Thanks > Gui

[Patch-2v3, rs6000] Eliminate unnecessary byte swaps for duplicated constant vector store [PR113325]

2024-06-17 Thread HAO CHEN GUI
Hi, This patch creates an insn_and_split pattern which helps the duplicated constant vector replace the source pseudo of store insn in fwprop pass. Thus the store can be implemented by a single stxvd2x and it eliminates the unnecessary byte swap insn on P8 LE. The test case shows the optimization

Re: [PATCH-1v3] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-14 Thread HAO CHEN GUI
Hi Richard, Thanks for your comments. 在 2024/6/12 15:51, Richard Sandiford 写道: > It should only be necessary to call change_is_worthwhile once, > with strict == !prop.likely_profitable_p () > > So something like: > > bool ok = recog (attempt, use_change); > if (ok && !prop.changed_mem_p ()

Re: [PATCH-1v3] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-14 Thread HAO CHEN GUI
在 2024/6/14 16:36, Richard Sandiford 写道: > Ah, ok. If the problem is stale recog_data information, I think we > should instead make recog.cc:swap_change conditionally invalidate it. > I.e. change: > > if (changes[num].object && !MEM_P (changes[num].object)) > std::swap (INSN_CODE (change

Re: [PATCH-1v3] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-11 Thread HAO CHEN GUI
Missing CC to Jeff Law. Sorry. 在 2024/6/12 10:41, HAO CHEN GUI 写道: > Hi, > This patch replaces rtx_cost with insn_cost in forward propagation. > In the PR, one constant vector should be propagated and replace a > pseudo in a store insn if we know it's a duplicated constant vec

[Patch-2v2, rs6000] Eliminate unnecessary byte swaps for duplicated constant vector store [PR113325]

2024-06-11 Thread HAO CHEN GUI
Hi, This patch creates an insn_and_split pattern which helps the duplicated constant vector replace the source pseudo of store insn in fwprop pass. Thus the store can be implemented by a single stxvd2x and it eliminates the unnecessary byte swap insn on P8 LE. The test case shows the optimization

[PATCH-1v3] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-11 Thread HAO CHEN GUI
Hi, This patch replaces rtx_cost with insn_cost in forward propagation. In the PR, one constant vector should be propagated and replace a pseudo in a store insn if we know it's a duplicated constant vector. It reduces the insn cost but not rtx cost. In this case, the cost is determined by destina

Re: [Patch-2, rs6000] Eliminate unnecessary byte swaps for duplicated constant vector store [PR113325]

2024-06-05 Thread HAO CHEN GUI
Hi Kewen, 在 2024/6/5 17:00, Kewen.Lin 写道: > This predicate can be moved to its only use (define_insn part condition). > The const_vector match_code check is redundant as const_vec_duplicate_p > already checks that, I wonder if we really need easy_altivec_constant? > Even if one vector constant doe

Ping [Patch-2, rs6000] Eliminate unnecessary byte swaps for duplicated constant vector store [PR113325]

2024-06-04 Thread HAO CHEN GUI
Hi, Gently ping the patch. https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643995.html Thanks Gui Haochen 在 2024/1/26 9:17, HAO CHEN GUI 写道: > Hi, > This patch creates an insn_and_split pattern which helps the duplicated > constant vector replace the source pseudo of stor

Re: [PATCH-1] fwprop: Replace rtx_cost with insn_cost in try_fwprop_subst_pattern [PR113325]

2024-06-04 Thread HAO CHEN GUI
Hi Jeff, 在 2024/6/4 22:14, Jeff Law 写道: > > > On 1/25/24 6:16 PM, HAO CHEN GUI wrote: >> Hi, >>    This patch replaces rtx_cost with insn_cost in forward propagation. >> In the PR, one constant vector should be propagated and replace a >> pseudo in a store

Ping [PATCH-1v3, rs6000] Implement optab_isinf for SFDF and IEEE128

2024-06-02 Thread HAO CHEN GUI
[PATCH-3v3, rs6000] Implement optab_isnormal for SFDF and IEEE128 https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652595.html Thanks Gui Haochen 在 2024/5/24 14:02, HAO CHEN GUI 写道: > Hi, > This patch implemented optab_isinf for SFDF and IEEE128 by test > data class instructions. >

Ping [PATCHv5] Optab: add isnormal_optab for __builtin_isnormal

2024-06-02 Thread HAO CHEN GUI
Hi, All issues were addressed. Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653001.html Thanks Gui Haochen 在 2024/5/29 14:36, HAO CHEN GUI 写道: > Hi, > This patch adds an optab for __builtin_isnormal. The normal check can be > implemented on rs6000 by

Ping [PATCHv5] Optab: add isfinite_optab for __builtin_isfinite

2024-06-02 Thread HAO CHEN GUI
Hi, All issues were addressed. Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652991.html Thanks Gui Haochen 在 2024/5/29 14:36, HAO CHEN GUI 写道: > Hi, > This patch adds an optab for __builtin_isfinite. The finite check can be > implemented on rs6000 by

[PATCHv2, rs6000] Optimize vector construction with two vector doubleword loads [PR103568]

2024-05-30 Thread HAO CHEN GUI
Hi, This patch optimizes vector construction with two vector doubleword loads. It generates an optimal insn sequence as "xxlor" has lower latency than "mtvsrdd" on Power10. Compared with previous version, the main change is to use "isa" attribute to guard "lxsd" and "lxsdx". https://gcc.gnu.or

[PATCH, rs6000] Optimize vector construction with two vector doubleword loads [PR103568]

2024-05-29 Thread HAO CHEN GUI
Hi, This patch optimizes vector construction with two vector doubleword loads. It generates an optimal insn sequence as "xxlor" has lower latency than "mtvsrdd" on Power10. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. OK for the trunk? Thanks Gui Haochen ChangeLo

Re: [PATCH-1, rs6000] Add a new type of CC mode - CCBCD for bcd insns [PR100736, PR114732]

2024-05-29 Thread HAO CHEN GUI
Hi Kewen, 在 2024/5/29 13:26, Kewen.Lin 写道: > I can understand re-using "unordered" and "eq" will save some efforts than > doing with unspecs, but they are actually RTL codes instead of bits on the > specific hardware CR, a downside is that people who isn't aware of this > design point can have som

[PATCH-1v3] Value Range: Add range op for builtin isinf

2024-05-29 Thread HAO CHEN GUI
Hi, The builtin isinf is not folded at front end if the corresponding optab exists. It causes the range evaluation failed on the targets which has optab_isinf. For instance, range-sincos.c will fail on the targets which has optab_isinf as it calls builtin_isinf. This patch fixed the problem by

[PATCH-3v2] Value Range: Add range op for builtin isnormal

2024-05-29 Thread HAO CHEN GUI
Hi, This patch adds the range op for builtin isnormal. It also adds two help function in frange to detect range of normal floating-point and range of subnormal or zero. Compared to previous version, the main change is to set the range to 1 if it's normal number otherwise to 0. https://gcc.gnu.

[PATCH-2v4] Value Range: Add range op for builtin isfinite

2024-05-29 Thread HAO CHEN GUI
Hi, This patch adds the range op for builtin isfinite. Compared to previous version, the main change is to set the range to 1 if it's finite number otherwise to 0. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652220.html Bootstrapped and tested on x86 and powerpc64-linux BE and LE wit

[PATCHv5] Optab: add isnormal_optab for __builtin_isnormal

2024-05-29 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isnormal. The normal check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

[PATCHv5] Optab: add isfinite_optab for __builtin_isfinite

2024-05-28 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isfinite. The finite check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

[PATCHv4] Optab: add isnormal_optab for __builtin_isnormal

2024-05-27 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isnormal. The normal check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

[PATCHv4] Optab: add isfinite_optab for __builtin_isfinite

2024-05-27 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isfinite. The finite check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

[PATCHv3] Optab: add isnormal_optab for __builtin_isnormal

2024-05-27 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isnormal. The normal check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

[PATCHv3] Optab: add isfinite_optab for __builtin_isfinite

2024-05-27 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isfinite. The finite check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

Re: [PATCHv2] Optab: add isfinite_optab for __builtin_isfinite

2024-05-27 Thread HAO CHEN GUI
Hi Kewen, Thanks for your comments. 在 2024/5/27 11:18, Kewen.Lin 写道: > Does this require "This pattern is not allowed to FAIL."? > > I guess yes? Since if it's decided to go with this pattern > expanding, there is no fall back? The builtin is inline folded if the optab doesn't exist on the

Ping^2 [Patch, rs6000] Enable overlap memory store for block memory clear

2024-05-26 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646478.html Thanks Gui Haochen 在 2024/5/8 9:55, HAO CHEN GUI 写道: > Hi, > As now it's stage 1, gently ping this: > https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646478.html > > Thanks

Ping [PATCH-1v2] Value Range: Add range op for builtin isinf

2024-05-26 Thread HAO CHEN GUI
.html [PATCH-3] Value Range: Add range op for builtin isnormal https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652221.html Thanks Gui Haochen 在 2024/5/21 10:52, HAO CHEN GUI 写道: > Hi, > The builtin isinf is not folded at front end if the corresponding optab > exists. It causes

Ping [PATCHv2] Optab: add isnormal_optab for __builtin_isnormal

2024-05-26 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652172.html Thanks Gui Haochen 在 2024/5/20 16:15, HAO CHEN GUI 写道: > Hi, > This patch adds an optab for __builtin_isnormal. The normal check can be > implemented on rs6000 by a single instruction. It needs an op

Ping [PATCHv2] Optab: add isfinite_optab for __builtin_isfinite

2024-05-26 Thread HAO CHEN GUI
Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652170.html Thanks Gui Haochen 在 2024/5/20 16:15, HAO CHEN GUI 写道: > Hi, > This patch adds an optab for __builtin_isfinite. The finite check can be > implemented on rs6000 by a single instruction. It needs an op

Ping^2 [PATCH-1, rs6000] Add a new type of CC mode - CCBCD for bcd insns [PR100736, PR114732]

2024-05-26 Thread HAO CHEN GUI
Hi, Gently ping them. Thanks Gui Haochen 在 2024/5/13 9:56, HAO CHEN GUI 写道: > Hi, > Gently ping the series of patches. > [PATCH-1, rs6000]Add a new type of CC mode - CCBCD for bcd insns [PR100736, > PR114732] > https://gcc.gnu.org/pipermail/gcc-patches/2024-April/650217.

[PATCH-3v3, rs6000] Implement optab_isnormal for SFDF and IEEE128

2024-05-23 Thread HAO CHEN GUI
Hi, This patch implemented optab_isnormal for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to narrow down the predict for float operand according to review's advice. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652130.html Bootst

[PATCH-2v3, rs6000] Implement optab_isfinite for SFDF and IEEE128

2024-05-23 Thread HAO CHEN GUI
Hi, This patch implemented optab_isfinite for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to narrow down the predict for float operand according to review's advice. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652129.html Bootst

[PATCH-1v3, rs6000] Implement optab_isinf for SFDF and IEEE128

2024-05-23 Thread HAO CHEN GUI
Hi, This patch implemented optab_isinf for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to narrow down the predict for float operand according to review's advice. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652128.html Bootstrap

Re: [PATCH-1v2, rs6000] Implement optab_isinf for SFDF and IEEE128

2024-05-23 Thread HAO CHEN GUI
Hi Peter, Thanks for your comments. 在 2024/5/23 5:58, Peter Bergner 写道: > Is there a reason not to use the vsx_register_operand predicate for op1 > which matches the predicate for the operand of the xststdcp pattern > we're passing op1 to? No, I will fix them. Thanks Gui Haochen

[PATCH-3] Value Range: Add range op for builtin isnormal

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds the range op for builtin isnormal. It also adds two help function in frange to detect range of normal floating-point and range of subnormal or zero. Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no regressions. Is it OK for the trunk? Thanks Gui Haochen

[PATCH-2v3] Value Range: Add range op for builtin isfinite

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds the range op for builtin isfinite. Compared to previous version, the main change is to set varying if nothing is known about the range. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650857.html Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no reg

[PATCH-1v2] Value Range: Add range op for builtin isinf

2024-05-20 Thread HAO CHEN GUI
Hi, The builtin isinf is not folded at front end if the corresponding optab exists. It causes the range evaluation failed on the targets which has optab_isinf. For instance, range-sincos.c will fail on the targets which has optab_isinf as it calls builtin_isinf. This patch fixed the problem by

[PATCHv2] Optab: add isnormal_optab for __builtin_isnormal

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isnormal. The normal check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

[PATCHv2] Optab: add isfinite_optab for __builtin_isfinite

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isfinite. The finite check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

Re: [PATCH] Optab: add isfinite_optab for __builtin_isfinite

2024-05-19 Thread HAO CHEN GUI
Hi Andrew, 在 2024/5/19 3:42, Andrew Pinski 写道: > This is missing adding documentation for the new optab. > It should be documented in md.texi under `Standard Pattern Names For > Generation` section. Thanks for your reminder. I will add ones for all patches. Thanks Gui Haochen

[PATCH-3v2, rs6000] Implement optab_isnormal for SFDF and IEEE128

2024-05-19 Thread HAO CHEN GUI
Hi, This patch implemented optab_isnormal for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is not to test if pseudo can be created in expand and modify dg-options and dg-finals of test cases according to reviewer's advice. https://gcc.gnu.or

  1   2   3   4   5   >