Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-11 Thread Martin Liška
On 9/11/19 2:23 PM, Richard Biener wrote: > On Wed, 11 Sep 2019, Martin Liška wrote: > >> Hello. >> >> One another updated version of the patch. >> Changes from the previous version: >> - I fixed: >> gimple *stmt1 = (gimple *) XALLOCAVEC (char, gimple_size (GIMPLE_ASSIGN, >> 2)); >> into gimp

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-11 Thread Richard Biener
On Wed, 11 Sep 2019, Martin Liška wrote: > Hello. > > One another updated version of the patch. > Changes from the previous version: > - I fixed: > gimple *stmt1 = (gimple *) XALLOCAVEC (char, gimple_size (GIMPLE_ASSIGN, > 2)); > into gimple_size (GIMPLE_ASSIGN, 3) > - I simplified condition

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-11 Thread Martin Liška
Hello. One another updated version of the patch. Changes from the previous version: - I fixed: gimple *stmt1 = (gimple *) XALLOCAVEC (char, gimple_size (GIMPLE_ASSIGN, 2)); into gimple_size (GIMPLE_ASSIGN, 3) - I simplified condition in gimple_simplified_result_is_gimple_val - optimize_vec_con

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-11 Thread Martin Liška
On 9/11/19 10:22 AM, Li Jia He wrote: > Hi, > > On 2019/9/10 3:40 PM, Martin Liška wrote: >> On 9/9/19 3:55 PM, Richard Biener wrote: >>> On Mon, 9 Sep 2019, Martin Liška wrote: >>> On 9/9/19 3:42 PM, Richard Biener wrote: > There is no newly created GIMPLE? Hm, I thought from t

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-10 Thread Martin Liška
On 9/9/19 3:55 PM, Richard Biener wrote: On Mon, 9 Sep 2019, Martin Liška wrote: On 9/9/19 3:42 PM, Richard Biener wrote: There is no newly created GIMPLE? Hm, I thought from the beginning that maybe_fold_comparisons_from_match_pd can come up with new temporary expressions that need to be in

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Richard Biener
On Mon, 9 Sep 2019, Martin Liška wrote: > On 9/9/19 3:42 PM, Richard Biener wrote: > > There is no newly created GIMPLE? > > Hm, I thought from the beginning that maybe_fold_comparisons_from_match_pd > can come up with new temporary expressions that need to be inserted into > GIMPLE stream? But t

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Martin Liška
On 9/9/19 3:42 PM, Richard Biener wrote: > There is no newly created GIMPLE? Hm, I thought from the beginning that maybe_fold_comparisons_from_match_pd can come up with new temporary expressions that need to be inserted into GIMPLE stream? But that's probably handled in ifcombine with:

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Richard Biener
On Mon, 9 Sep 2019, Martin Liška wrote: > On 9/9/19 3:10 PM, Richard Biener wrote: > > On Mon, 9 Sep 2019, Martin Liška wrote: > > > >> Hi. > >> > >> I'm sending slightly updated version of the patch where we > >> need to properly select type in maybe_fold_comparisons_from_match_pd > >> function

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Martin Liška
On 9/9/19 3:10 PM, Richard Biener wrote: > On Mon, 9 Sep 2019, Martin Liška wrote: > >> Hi. >> >> I'm sending slightly updated version of the patch where we >> need to properly select type in maybe_fold_comparisons_from_match_pd >> function for the created SSA_NAMEs. We can be called for a VECTOR_

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Richard Biener
On Mon, 9 Sep 2019, Martin Liška wrote: > On 9/9/19 3:10 PM, Marc Glisse wrote: > > On Mon, 9 Sep 2019, Martin Liška wrote: > > > >> I'm sending slightly updated version of the patch where we > >> need to properly select type in maybe_fold_comparisons_from_match_pd > >> function for the created S

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Martin Liška
On 9/9/19 3:10 PM, Marc Glisse wrote: > On Mon, 9 Sep 2019, Martin Liška wrote: > >> I'm sending slightly updated version of the patch where we >> need to properly select type in maybe_fold_comparisons_from_match_pd >> function for the created SSA_NAMEs. We can be called for a VECTOR_TYPE >> and s

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Marc Glisse
On Mon, 9 Sep 2019, Martin Liška wrote: I'm sending slightly updated version of the patch where we need to properly select type in maybe_fold_comparisons_from_match_pd function for the created SSA_NAMEs. We can be called for a VECTOR_TYPE and so that we can't return a boolean_type_node. + tre

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Richard Biener
On Mon, 9 Sep 2019, Martin Liška wrote: > Hi. > > I'm sending slightly updated version of the patch where we > need to properly select type in maybe_fold_comparisons_from_match_pd > function for the created SSA_NAMEs. We can be called for a VECTOR_TYPE > and so that we can't return a boolean_type

Re: [PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-09 Thread Martin Liška
Hi. I'm sending slightly updated version of the patch where we need to properly select type in maybe_fold_comparisons_from_match_pd function for the created SSA_NAMEs. We can be called for a VECTOR_TYPE and so that we can't return a boolean_type_node. Patch can bootstrap on x86_64-linux-gnu and s

[PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd

2019-09-06 Thread Martin Liška
if you or Martin wants to improve it according to my > comments. > > Thanks, > Richard. > I'm sending patch that addresses the feedback from Richard. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From 6f8