[PATCH 2/2] match.pd: Extend pointer alignment folds

2025-03-15 Thread Richard Sandiford
We have long had the fold: /* Pattern match tem = (sizetype) ptr; tem = tem & algn; tem = -tem; ... = ptr p+ tem; and produce the simpler and easier to analyze with respect to alignment ... = ptr & ~algn; */ But the gimple in gcc.target/aarch64/sve/pr98119.c has a var

Re: [PATCH 2/2] match.pd: Extend pointer alignment folds

2025-03-13 Thread Richard Biener
On Wed, 12 Mar 2025, Richard Sandiford wrote: > We have long had the fold: > > /* Pattern match > tem = (sizetype) ptr; > tem = tem & algn; > tem = -tem; > ... = ptr p+ tem; >and produce the simpler and easier to analyze with respect to alignment > ... = ptr & ~algn;