Re: [PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-26 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Sun, Jun 25, 2023 at 7:39 AM Roger Sayle > wrote: >> >> >> On Tue, 13 June 2023 12:02, Richard Biener wrote: >> > On Mon, Jun 12, 2023 at 4:04 PM Roger Sayle >> > wrote: >> > > The following simple test case, from PR 104610, shows that memcmp () >> >

Re: [PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-26 Thread Richard Biener via Gcc-patches
On Sun, Jun 25, 2023 at 7:39 AM Roger Sayle wrote: > > > On Tue, 13 June 2023 12:02, Richard Biener wrote: > > On Mon, Jun 12, 2023 at 4:04 PM Roger Sayle > > wrote: > > > The following simple test case, from PR 104610, shows that memcmp () > > > == 0 can result in some bizarre code sequences on

RE: [PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-24 Thread Roger Sayle
On Tue, 13 June 2023 12:02, Richard Biener wrote: > On Mon, Jun 12, 2023 at 4:04 PM Roger Sayle > wrote: > > The following simple test case, from PR 104610, shows that memcmp () > > == 0 can result in some bizarre code sequences on x86. > > > > int foo(char *a) > > { > > static const char

Re: [PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-13 Thread Richard Biener via Gcc-patches
On Mon, Jun 12, 2023 at 4:04 PM Roger Sayle wrote: > > > The following simple test case, from PR 104610, shows that memcmp () == 0 > can result in some bizarre code sequences on x86. > > int foo(char *a) > { > static const char t[] = "0123456789012345678901234567890"; > return

Re: [PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-12 Thread Uros Bizjak via Gcc-patches
On Mon, Jun 12, 2023 at 4:03 PM Roger Sayle wrote: > > > The following simple test case, from PR 104610, shows that memcmp () == 0 > can result in some bizarre code sequences on x86. > > int foo(char *a) > { > static const char t[] = "0123456789012345678901234567890"; > return

[PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-12 Thread Roger Sayle
The following simple test case, from PR 104610, shows that memcmp () == 0 can result in some bizarre code sequences on x86. int foo(char *a) { static const char t[] = "0123456789012345678901234567890"; return __builtin_memcmp(a, [0], sizeof(t)) == 0; } with -O2 currently contains both: