This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/68376] [4.9 Regression] wrong code at -O1 and above on x86_64-linux-gnu


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68376

Zdenek Sojka <zsojka at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zsojka at seznam dot cz

--- Comment #8 from Zdenek Sojka <zsojka at seznam dot cz> ---
The testcase is failing in trunk r230609 with -ftracer (x86_64):
$ gcc -O -ftracer pr68376-2.c
$./a.out
Aborted

5-branch is fine; 4_9-branch and 4_8-branch are failing (they are unfixed for
the original issue).

Dumps up to .optimized look fine, it still seems to be an RTL optimizer bug, so
I didn't create a separate PR.

Simplifid testcase:

$ cat testcase.c
__attribute__((noinline, noclone)) int
f3 (int x)
{
  return x <= 0 ? ~x : x;
}

int
main ()
{
  if (f3 (0) != -1)
    __builtin_abort ();
  return 0;
}


asm output:
f3:
        movl    %edi, %eax
        sarl    $31, %eax
        xorl    %edi, %eax
        ret

this would be valid for "x < 0 ? ~x : x".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]