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 ()
>> >
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
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 t[
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 __builtin_me
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 __builtin_me
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, &t[0], sizeof(t)) == 0;
}
with -O2 currently contains both: