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