This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/68376] [4.9 Regression] wrong code at -O1 and above on x86_64-linux-gnu
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Nov 2015 11:19:52 +0000
- Subject: [Bug rtl-optimization/68376] [4.9 Regression] wrong code at -O1 and above on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-68376-4 at http dot gcc dot gnu dot org/bugzilla/>
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".