Re: [PATCH 1/2] match.pd: Support combine cond_len_op + vec_cond similar to cond_op

2023-10-31 Thread Lehua Ding
Hi Andrew, Yes and maybe use tree for the type of op_list instead of auto. I suspect this code was originally written before GCC was written in C++11. Maybe if this code is being compiled with C++20 we could do something like: #include template< std::same_as... op_types> To get a decent error

Re: [PATCH 1/2] match.pd: Support combine cond_len_op + vec_cond similar to cond_op

2023-10-31 Thread Andrew Pinski
On Tue, Oct 31, 2023 at 12:08 AM Lehua Ding wrote: > > Hi Andrew, > > On 2023/10/31 14:48, Andrew Pinski wrote: > >> +inline > >> +gimple_match_op::gimple_match_op (const gimple_match_cond _in, > >> + code_helper code_in, tree type_in, > >> +

Re: [PATCH 1/2] match.pd: Support combine cond_len_op + vec_cond similar to cond_op

2023-10-31 Thread Lehua Ding
Hi Andrew, On 2023/10/31 14:48, Andrew Pinski wrote: +inline +gimple_match_op::gimple_match_op (const gimple_match_cond _in, + code_helper code_in, tree type_in, + tree op0, tree op1, tree op2, tree op3, +

Re: [PATCH 1/2] match.pd: Support combine cond_len_op + vec_cond similar to cond_op

2023-10-31 Thread Andrew Pinski
On Wed, Sep 20, 2023 at 6:10 AM Lehua Ding wrote: > > This patch adds combine cond_len_op and vec_cond to cond_len_op like > cond_op. > > gcc/ChangeLog: > > * gimple-match.h (gimple_match_op::gimple_match_op): > Add interfaces for more arguments. >

Re: [PATCH 1/2] match.pd: Support combine cond_len_op + vec_cond similar to cond_op

2023-10-31 Thread Lehua Ding
Committed, thanks Jeff. On 2023/9/28 6:24, Jeff Law wrote: On 9/20/23 07:09, Lehua Ding wrote: This patch adds combine cond_len_op and vec_cond to cond_len_op like cond_op. gcc/ChangeLog: * gimple-match.h (gimple_match_op::gimple_match_op): Add interfaces for more arguments.

Re: [PATCH 1/2] match.pd: Support combine cond_len_op + vec_cond similar to cond_op

2023-09-27 Thread Jeff Law
On 9/20/23 07:09, Lehua Ding wrote: This patch adds combine cond_len_op and vec_cond to cond_len_op like cond_op. gcc/ChangeLog: * gimple-match.h (gimple_match_op::gimple_match_op): Add interfaces for more arguments. (gimple_match_op::set_op): Add interfaces for more

[PATCH 1/2] match.pd: Support combine cond_len_op + vec_cond similar to cond_op

2023-09-20 Thread Lehua Ding
This patch adds combine cond_len_op and vec_cond to cond_len_op like cond_op. gcc/ChangeLog: * gimple-match.h (gimple_match_op::gimple_match_op): Add interfaces for more arguments. (gimple_match_op::set_op): Add interfaces for more arguments. * match.pd: Add