Re: [PATCH] ivopts: Improve code generated for very simple loops.

2021-11-16 Thread Richard Biener via Gcc-patches
On Mon, Nov 15, 2021 at 2:04 PM Roger Sayle wrote: > > > This patch tidies up the code that GCC generates for simple loops, > by selecting/generating a simpler loop bound expression in ivopts. > The original motivation came from looking at the following loop (from > gcc.target/i386/pr90178.c) > >

[PATCH] ivopts: Improve code generated for very simple loops.

2021-11-15 Thread Roger Sayle
This patch tidies up the code that GCC generates for simple loops, by selecting/generating a simpler loop bound expression in ivopts. The original motivation came from looking at the following loop (from gcc.target/i386/pr90178.c) int *find_ptr (int* mem, int sz, int val) { for (int i = 0; i <