Re: Recognizing loop pattern

2020-10-27 Thread Stefan Schulze Frielinghaus via Gcc
On Mon, Oct 26, 2020 at 01:46:52PM +0100, Richard Biener wrote: > On Mon, Oct 26, 2020 at 10:59 AM Stefan Schulze Frielinghaus via Gcc > wrote: > > > > I'm trying to detect loops of the form > > > > while (*x != y) > > ++x; > > > > which mimic the behaviour of function rawmemchr. Note, the

Re: Recognizing loop pattern

2020-10-26 Thread Richard Biener via Gcc
On Mon, Oct 26, 2020 at 10:59 AM Stefan Schulze Frielinghaus via Gcc wrote: > > I'm trying to detect loops of the form > > while (*x != y) > ++x; > > which mimic the behaviour of function rawmemchr. Note, the size of *x is not > necessarily one byte. Thus ultimately I would like to detect

RE: Recognizing loop pattern

2020-10-26 Thread Kyrylo Tkachov via Gcc
> -Original Message- > From: Gcc On Behalf Of Stefan Schulze > Frielinghaus via Gcc > Sent: 26 October 2020 09:58 > To: gcc@gcc.gnu.org > Subject: Recognizing loop pattern > > I'm trying to detect loops of the form > > while (*x != y) > ++x; > > which mimic the behaviour of fun