RE: [PATCH]middle-end: Implement conditonal store vectorizer pattern [PR115531]

2024-07-11 Thread Richard Biener
On Wed, 10 Jul 2024, Tamar Christina wrote: > > > > > > > > > + } > > > > > + > > > > > + if (new_code == ERROR_MARK) > > > > > + { > > > > > + /* We couldn't flip the condition, so invert the mask > > > > > instead. */ > > > > > + itype = TREE_TYPE (cmp_ls); > > > > > +

RE: [PATCH]middle-end: Implement conditonal store vectorizer pattern [PR115531]

2024-07-10 Thread Tamar Christina
Sorry missed a review comment to change !DR_IS_WRITE into DR_IS_READ. Updated patch: Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/115531 * tree-vect-patterns.cc (vect_cond_store_pattern_same_re

RE: [PATCH]middle-end: Implement conditonal store vectorizer pattern [PR115531]

2024-07-10 Thread Tamar Christina
> > > > > > > + } > > > > + > > > > + if (new_code == ERROR_MARK) > > > > + { > > > > + /* We couldn't flip the condition, so invert the mask > > > > instead. */ > > > > + itype = TREE_TYPE (cmp_ls); > > > > + conv = gimple_build_assign (var, BIT_XOR_EXPR,

RE: [PATCH]middle-end: Implement conditonal store vectorizer pattern [PR115531]

2024-06-26 Thread Richard Biener
On Wed, 26 Jun 2024, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Wednesday, June 26, 2024 2:23 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > > Subject: Re: [PATCH]mi

RE: [PATCH]middle-end: Implement conditonal store vectorizer pattern [PR115531]

2024-06-26 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Wednesday, June 26, 2024 2:23 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: Re: [PATCH]middle-end: Implement conditonal store vectorizer pattern > [PR115531] >

Re: [PATCH]middle-end: Implement conditonal store vectorizer pattern [PR115531]

2024-06-26 Thread Richard Biener
On Tue, 25 Jun 2024, Tamar Christina wrote: > Hi All, > > This adds a conditional store optimization for the vectorizer as a pattern. > The vectorizer already supports modifying memory accesses because of the > pattern > based gather/scatter recognition. > > Doing it in the vectorizer allows us

[PATCH]middle-end: Implement conditonal store vectorizer pattern [PR115531]

2024-06-25 Thread Tamar Christina
Hi All, This adds a conditional store optimization for the vectorizer as a pattern. The vectorizer already supports modifying memory accesses because of the pattern based gather/scatter recognition. Doing it in the vectorizer allows us to still keep the ability to vectorize such loops for archite