This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/61306] [4.10 Regression] wrong code at -Os and above on x86_64-linux-gnu
- From: "thopre01 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Jun 2014 02:11:59 +0000
- Subject: [Bug tree-optimization/61306] [4.10 Regression] wrong code at -Os and above on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-61306-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61306
--- Comment #9 from thopre01 at gcc dot gnu.org ---
Author: thopre01
Date: Mon Jun 30 02:11:21 2014
New Revision: 212134
URL: https://gcc.gnu.org/viewcvs?rev=212134&root=gcc&view=rev
Log:
2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2014-06-20 Jakub Jelinek <jakub@redhat.com>
2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR tree-optimization/61306
* tree-ssa-math-opts.c (struct symbolic_number): Store type of
expression instead of its size.
(do_shift_rotate): Adapt to change in struct symbolic_number. Return
false to prevent optimization when the result is unpredictable due to
arithmetic right shift of signed type with highest byte is set.
(verify_symbolic_number_p): Adapt to change in struct symbolic_number.
(find_bswap_1): Likewise. Return NULL to prevent optimization when the
result is unpredictable due to sign extension.
(find_bswap): Adapt to change in struct symbolic_number.
gcc/testsuite/
* gcc.c-torture/execute/pr61306-1.c: New test.
* gcc.c-torture/execute/pr61306-2.c: Likewise.
* gcc.c-torture/execute/pr61306-3.c: Likewise.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-ssa-math-opts.c