[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

[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-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

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.

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 [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 [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^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

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

[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

[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

[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

[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

[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

[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

[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

[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-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

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, 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

[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

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

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 [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. >

[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

[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

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

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 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: [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

[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

[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

[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

[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

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

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: [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-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-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: [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-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-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

[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

[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

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

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-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 ()

[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

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

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 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

[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

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-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

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

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

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

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-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^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/

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^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

[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

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

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^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/

[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

[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

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

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: [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: [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 

[PATCH] Optab: add isfinite_optab for __builtin_isfinite

2024-04-11 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. Bootstrapped and tested on x86 an

[PATCH] Value range: Add range op for __builtin_isfinite

2024-04-11 Thread HAO CHEN GUI
Hi, The former patch adds isfinite optab for __builtin_isfinite. https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649339.html Thus the builtin might not be folded at front end. The range op for isfinite is needed for value range analysis. This patch adds them. Bootstrapped and tested on

[PATCH-2, rs6000] Implement optab_isfinite for SFmode, DFmode and TFmode [PR97786]

2024-04-11 Thread HAO CHEN GUI
Hi, This patch implemented optab_finite for SF/DF/TFmode by rs6000 test data class instructions. This patch relies on former patch which adds optab_finite. https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649339.html Bootstrapped and tested on powerpc64-linux BE and LE with no regressio

[PATCH-3] Builtin: Fold builtin_isfinite on IBM long double to builtin_isfinite on double [PR97786]

2024-04-11 Thread HAO CHEN GUI
Hi, This patch folds builtin_isfinite on IBM long double to builtin_isfinite on double type. The former patch https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649346.html implemented the DFmode isfinite_optab. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is it

[PATCH] Optab: add isnormal_optab for __builtin_isnormal

2024-04-12 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. Bootstrapped and tested on x86 an

[PATCH-4, rs6000] Implement optab_isnormal for SFmode, DFmode and TFmode [PR97786]

2024-04-12 Thread HAO CHEN GUI
Hi, This patch implemented optab_isnormal for SF/DF/TFmode by rs6000 test data class instructions. This patch relies on former patch which adds optab_isnormal. https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649366.html Bootstrapped and tested on powerpc64-linux BE and LE with no regre

[PATCH, rs6000] Fix test case bcd4.c

2024-04-16 Thread HAO CHEN GUI
Hi, This patch fixes loss of return statement in maxbcd of bcd-4.c. Without return statement, it returns an invalid bcd number and make the test noneffective. The patch also enables test to run on Power9 and Big Endian, as all bcd instructions are supported from Power9. Bootstrapped and tested

[PATCH, rs6000] Use bcdsub. instead of bcdadd. for bcd invalid number checking

2024-04-17 Thread HAO CHEN GUI
Hi, This patch replace bcdadd. with bcdsub. for bcd invalid number checking. bcdadd on two same numbers might cause overflow which also set overflow/invalid bit so that we can't distinguish it's invalid or overflow. The bcdsub doesn't have the problem as subtracting on two same number never cause

Re: [PATCH] Value range: Add range op for __builtin_isfinite

2024-04-23 Thread HAO CHEN GUI
Yes, it's my typo. Thanks. Gui Haochen 在 2024/4/23 17:10, rep.dot@gmail.com 写道: > On 12 April 2024 07:30:10 CEST, HAO CHEN GUI wrote: > > >> >> >> patch.diff >> diff --git a/gcc/gimple-range-op.cc b/gcc/gimple-range-op.cc >> index 9de130b4022..

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

2024-04-30 Thread HAO CHEN GUI
Hi, It's the first patch of a series of patches optimizing CC modes on rs6000. bcd insns set all four bits of a CR field. But it has different single bit reverse behavior than CCFP's. The forth bit of bcd cr fields is used to indict overflow or invalid number. It's not a bit for unordered test

[PATCH-2, rs6000] Add a new type of CC mode - CCLTEQ

2024-04-30 Thread HAO CHEN GUI
Hi, It's the second patch of a series of patches optimizing CC modes on rs6000. This patch adds a new type of CC mode - CCLTEQ used for the case which only set CR bit 0 and 2. The bit 1 and 3 are not used. The vector compare and test data class instructions are the cases. Bootstrapped and t

[PATCH-3, rs6000] Set CC mode of vector string isolate insns to CCEQ

2024-04-30 Thread HAO CHEN GUI
Hi, It's the third patch of a series of patches optimizing CC modes on rs6000. This patch sets CC mode of vector string isolate insns to CCEQ instead of CCFP as these insns only set/check CR bit 2. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is it OK for the tr

[PATCH-4, rs6000] Optimize single cc bit reverse implementation

2024-04-30 Thread HAO CHEN GUI
Hi, It's the forth patch of a series of patches optimizing CC modes on rs6000. The single CC bit reverse can be implemented by setbcr on Power10 or isel on Power9 or mfcr on Power8 and below. Originally CCFP is not supported for isel and setbcr as bcd insns use CCFP and its bit reverse is not

[PATCH-5, rs6000] Replace explicit CC bit reverse with common format

2024-05-05 Thread HAO CHEN GUI
Hi, It's the fifth patch of a series of patches optimizing CC modes on rs6000. There are some explicit CR6 bit reverse (mfcr/xor) expand in vector.md. As the forth patch optimized CC bit reverse implement, the patch changes the explicit format to the common format (testing if the bit is not se

[PATCH-6, rs6000] Split setcc to two insns after reload

2024-05-06 Thread HAO CHEN GUI
Hi, It's the sixth patch of a series of patches optimizing CC modes on rs6000. This patch splits setcc to two separate insns after reload so that other insns can be inserted between them. It should increase the parallelism. The rotate_cr pattern still needs the info of the number of cr fiel

[PATCHv2] Value range: Add range op for __builtin_isfinite

2024-05-06 Thread HAO CHEN GUI
Hi, The former patch adds isfinite optab for __builtin_isfinite. https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649339.html Thus the builtin might not be folded at front end. The range op for isfinite is needed for value range analysis. This patch adds them. Compared to last version,

Re: [Patch, rs6000] Enable overlap memory store for block memory clear

2024-05-07 Thread 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 Gui Haochen 在 2024/2/26 10:25, HAO CHEN GUI 写道: > Hi, > This patch enables overlap memory store for block memory clear which > saves the number of store ins

Ping [PATCH, RFC] combine: Don't truncate const operand of AND if it's no benefits

2024-05-07 Thread HAO CHEN GUI
Hi, Gently ping this: https://gcc.gnu.org/pipermail/gcc-patches/2024-March/647533.html Thanks Gui Haochen 在 2024/3/18 17:10, HAO CHEN GUI 写道: > Hi, > Gently ping this: > https://gcc.gnu.org/pipermail/gcc-patches/2024-March/647533.html > > Thanks > Gui Haochen > >

Ping^3 [PATCH, rs6000] Split TImode for logical operations in expand pass [PR100694]

2024-05-07 Thread HAO CHEN GUI
Hi, As now it's stage-1, gently ping this: https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611550.html Gui Haochen Thanks 在 2023/4/24 13:35, HAO CHEN GUI 写道: > Hi, > Gently ping this: > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611550.html > >

[PATCH] rs6000: Enable overlapped by-pieces operations

2024-05-08 Thread HAO CHEN GUI
Hi, This patch enables overlapped by-piece operations. On rs6000, default move/set/clear ratio is 2. So the overlap is only enabled with compare by-pieces. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is it OK for the trunk? Thanks Gui Haochen ChangeLog rs6000: E

Re: [PATCH] rs6000: Enable overlapped by-pieces operations

2024-05-09 Thread HAO CHEN GUI
Hi Kewen, Thanks for your comments. 在 2024/5/9 13:44, Kewen.Lin 写道: > Hi, > > on 2024/5/8 14:47, HAO CHEN GUI wrote: >> Hi, >> This patch enables overlapped by-piece operations. On rs6000, default >> move/set/clear ratio is 2. So the overlap is only enable

Re: [PATCH] rs6000: Enable overlapped by-pieces operations

2024-05-09 Thread HAO CHEN GUI
Hi Kewen, 在 2024/5/9 13:44, Kewen.Lin 写道: > Why does it need power8 forced here? I think it over. It's no need. For the sub-targets which library is called, l[hb]z won't be generated too. Thanks Gui Haochen

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

2024-05-09 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

[PATCHv2] rs6000: Enable overlapped by-pieces operations

2024-05-10 Thread HAO CHEN GUI
Hi, This patch enables overlapped by-piece operations. On rs6000, default move/set/clear ratio is 2. So the overlap is only enabled with compare by-pieces. Compared to previous version, the change is to remove power8 requirement from test case. https://gcc.gnu.org/pipermail/gcc-patches/2024-Ma

Re: [PATCH] rtlanal: Correct cost regularization in pattern_cost

2024-05-10 Thread HAO CHEN GUI
Hi Richard, Thanks for your comments. 在 2024/5/10 15:16, Richard Biener 写道: > But if targets return sth < COSTS_N_INSNS (1) but > 0 this is now no > longer meaningful. So shouldn't it instead be > > return cost > 0 ? cost : 1; Yes, it's better. > > ? Alternatively returning fractions of C

[PATCH] rtlanal: Correct cost regularization in pattern_cost

2024-05-12 Thread HAO CHEN GUI
Hi, The cost return from set_src_cost might be zero. Zero for pattern_cost means unknown cost. So the regularization converts the zero to COSTS_N_INSNS (1). // pattern_cost cost = set_src_cost (SET_SRC (set), GET_MODE (SET_DEST (set)), speed); return cost > 0 ? cost : COSTS_N_INSNS (1)

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

2024-05-12 Thread HAO CHEN GUI
] Replace explicit CC bit reverse with common format https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650766.html [PATCH-6, rs6000] Split setcc to two insns after reload https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650856.html Thanks Gui Haochen 在 2024/4/30 15:18, HAO CHEN GUI 写道: > Hi, >

Re: [PATCHv2] Value range: Add range op for __builtin_isfinite

2024-05-13 Thread HAO CHEN GUI
Hi Aldy, Thanks for your review comments. 在 2024/5/13 19:18, Aldy Hernandez 写道: > On Thu, May 9, 2024 at 10:05 AM Mikael Morin wrote: >> >> Hello, >> >> Le 07/05/2024 à 04:37, HAO CHEN GUI a écrit : >>> Hi, >>>The former patch adds isf

<    1   2   3   4   5   >