RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-14 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Thursday, December 14, 2023 1:13 PM > To: Tamar Christina > Cc: Richard Sandiford ; gcc-patches@gcc.gnu.org; > nd ; j...@ventanamicro.com > Subject: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-14 Thread Richard Biener
On Wed, 13 Dec 2023, Tamar Christina wrote: > > > > else if (vect_use_mask_type_p (stmt_info)) > > > > { > > > > unsigned int precision = stmt_info->mask_precision; > > > > scalar_type = build_nonstandard_integer_type (precision, 1); > > > > vectype = get_mask_type_for_scal

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-13 Thread Tamar Christina
> > > else if (vect_use_mask_type_p (stmt_info)) > > > { > > > unsigned int precision = stmt_info->mask_precision; > > > scalar_type = build_nonstandard_integer_type (precision, 1); > > > vectype = get_mask_type_for_scalar_type (vinfo, scalar_type, > > > group_size); > > >

Re: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-12 Thread Richard Biener
On Tue, 12 Dec 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Mon, 11 Dec 2023, Tamar Christina wrote: > >> @@ -5553,6 +5554,83 @@ integer_type_for_mask (tree var, vec_info *vinfo) > >>return build_nonstandard_integer_type (def_stmt_info->mask_precision, > >> 1); > >> } > >>

Re: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-12 Thread Richard Sandiford
Richard Biener writes: > On Mon, 11 Dec 2023, Tamar Christina wrote: >> @@ -5553,6 +5554,83 @@ integer_type_for_mask (tree var, vec_info *vinfo) >>return build_nonstandard_integer_type (def_stmt_info->mask_precision, 1); >> } >> >> +/* Function vect_recog_gcond_pattern >> + >> + Try to fi

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-12 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, December 12, 2023 10:10 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com; > Richard Sandiford > Subject: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-12 Thread Richard Biener
On Mon, 11 Dec 2023, Tamar Christina wrote: > > > + vectype = truth_type_for (comp_type); > > > > so this leaves the producer of the mask in the GIMPLE_COND and we > > vectorize the GIMPLE_COND as > > > > mask_1 = ...; > > if (mask_1 != {-1,-1...}) > > .. > > > > ? In principle only

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-11 Thread Tamar Christina
> > + vectype = truth_type_for (comp_type); > > so this leaves the producer of the mask in the GIMPLE_COND and we > vectorize the GIMPLE_COND as > > mask_1 = ...; > if (mask_1 != {-1,-1...}) > .. > > ? In principle only the mask producer needs a vector type and that > adjusted by bo

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-11 Thread Richard Biener
On Mon, 11 Dec 2023, Tamar Christina wrote: > > > > > > > > Hmm, but we're visiting them then? I wonder how you get along > > > > without doing adjustmens on the uses if you consider > > > > > > > > _1 = a < b; > > > > _2 = c != d; > > > > _3 = _1 | _2; > > > > if (_3 != 0) > > >

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-10 Thread Tamar Christina
> > > > > > Hmm, but we're visiting them then? I wonder how you get along > > > without doing adjustmens on the uses if you consider > > > > > > _1 = a < b; > > > _2 = c != d; > > > _3 = _1 | _2; > > > if (_3 != 0) > > > exit loop; > > > > > > thus a combined condition like >

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-08 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, December 8, 2023 2:00 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for > codegen of exit code &g

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-08 Thread Richard Biener
On Fri, 8 Dec 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, December 8, 2023 10:28 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > > Subject: R

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-08 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, December 8, 2023 10:28 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for > codegen of exit co

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-08 Thread Richard Biener
On Fri, 8 Dec 2023, Tamar Christina wrote: > > --param vect-partial-vector-usage=2 would, no? > > > I.. didn't even know it went to 2! > > > > In principal I suppose I could mask the individual stmts, that should > > > handle the > > future case when > > > This is relaxed to supposed non-fix le

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-08 Thread Tamar Christina
> --param vect-partial-vector-usage=2 would, no? > I.. didn't even know it went to 2! > > In principal I suppose I could mask the individual stmts, that should > > handle the > future case when > > This is relaxed to supposed non-fix length buffers? > > Well, it looks wrong - either put in an a

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-06 Thread Richard Biener
On Wed, 6 Dec 2023, Tamar Christina wrote: > > > > + > > > > + tree truth_type = truth_type_for (vectype_op); machine_mode mode = > > > > + TYPE_MODE (truth_type); int ncopies; > > > > + > > > > more line break issues ... (also below, check yourself) > > > > shouldn't STMT_VINFO_VECTYPE alrea

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-12-05 Thread Tamar Christina
> > > + > > > + tree truth_type = truth_type_for (vectype_op); machine_mode mode = > > > + TYPE_MODE (truth_type); int ncopies; > > > + > > more line break issues ... (also below, check yourself) > > shouldn't STMT_VINFO_VECTYPE already match truth_type here? If not > it looks to be set wrong

Re: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread juzhe.zhong
ubject: RE: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code Hi Juzhe,   I meant that “lens” is undefined, from looking around I guess that needs to be     vec_loop_lens *lens = &LOOP_VINFO_LENS (loop_vinfo);   for `bias` I meant       cond = gimple_build

Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread Richard Biener
s. > > -- > juzhe.zh...@rivai.ai > > > *From:* Tamar Christina > *Date:* 2023-11-30 18:58 > *To:* juzhe.zh...@rivai.ai; gcc-patches > *CC:* Richard Biener > *Subject:* RE: RE: [PATCH 9/21]middle-end: implement > vectorizable_early_exit for

Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread juzhe.zh...@rivai.ai
From: Tamar Christina Date: 2023-11-30 18:58 To: juzhe.zh...@rivai.ai; gcc-patches CC: Richard Biener Subject: RE: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code Hi Juzhe, I meant that “lens” is undefined, from looking around I guess that needs to be

RE: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread Tamar Christina
na ; gcc-patches Cc: Richard Biener Subject: Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code Thanks Tamar. I am not sure whether I am not on the same page with you. IMHO, ARM SVE will use the final mask = loop mask (generate by WHILE_ULT) & condition

Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread juzhe.zh...@rivai.ai
ar Christina Date: 2023-11-30 18:39 To: juzhe.zh...@rivai.ai; gcc-patches CC: Richard Biener Subject: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code Hi Juzhe, I’m happy to take the hunks, just that I can’t test it and don’t know the specifics of how it

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread Tamar Christina
Hi Juzhe, I'm happy to take the hunks, just that I can't test it and don't know the specifics of how it lens work. I still need to read up on it. I tried adding that chunk in, but for the first bit `lens` seems undefined, and the second bit it seems `bias` is undefined. I'll also need what to

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-29 Thread Richard Biener
On Mon, 27 Nov 2023, Tamar Christina wrote: > Ping > > > -Original Message- > > From: Tamar Christina > > Sent: Monday, November 6, 2023 7:40 AM > > To: gcc-patches@gcc.gnu.org > > Cc: nd ; rguent...@suse.de; j...@ventanamicro.com > > Subject: [PATCH 9/21]middle-end: implement vectorizab

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-27 Thread Tamar Christina
Ping > -Original Message- > From: Tamar Christina > Sent: Monday, November 6, 2023 7:40 AM > To: gcc-patches@gcc.gnu.org > Cc: nd ; rguent...@suse.de; j...@ventanamicro.com > Subject: [PATCH 9/21]middle-end: implement vectorizable_early_exit for > codegen of exit code > > Hi All, > > Th