This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25578] [4.2 Regression] gfortran version 4.2.0 20051227 - 144 new testsuite failures since 2005121
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Dec 2005 05:45:46 -0000
- Subject: [Bug rtl-optimization/25578] [4.2 Regression] gfortran version 4.2.0 20051227 - 144 new testsuite failures since 2005121
- References: <bug-25578-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-12-30 05:45 -------
(In reply to comment #5)
> int f(int x)
> {
> return x >> 31 ? -1 : 1;
> }
And we are missing an optimization here.
Right now (well before this patch) we optimization it as:
(- (((unsigned)x)>>31))|1
we we can optimize it as:
(x>>31)|1
I will file a bug about this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25578