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]

Re: gcc 3.0.4 thumb floating pt bug


Ted,

This is a generic bug in the combiner pass.

Can you please try this patch.

R.

2002-02-27  Richard Earnshaw  <rearnsha@arm.com>

	* combine.c (simplify_comparision): If simplifying a logical-shift 
	right and compare with constant to eliminate the shift, make the
	comparison unsigned.


Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.267
diff -p -r1.267 combine.c
*** combine.c	2002/02/20 23:15:00	1.267
--- combine.c	2002/02/27 10:55:40
*************** simplify_comparison (code, pop0, pop1)
*** 10885,10890 ****
--- 10885,10895 ----
  		  || (floor_log2 (const_op) + INTVAL (XEXP (op0, 1))
  		      < mode_width)))
  	    {
+ 	      /* If the shift was logical, then we must make the condition
+ 		 unsigned.  */
+ 	      if (GET_CODE (op0) == LSHIFTRT)
+ 		code = unsigned_condition (code);
+ 
  	      const_op <<= INTVAL (XEXP (op0, 1));
  	      op1 = GEN_INT (const_op);
  	      op0 = XEXP (op0, 0);

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