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/25578] [4.2 Regression] gfortran version 4.2.0 20051227 - 144 new testsuite failures since 2005121



------- 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


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