another IEE related problem

Jeffrey A Law law@cygnus.com
Wed Dec 10 19:56:00 GMT 1997


  In message < Pine.SOL.3.90.971210122825.25453C-100000@starsky.informatik.rwth-aachen.de >you write:
It seems to me that this code would be cleaner if you checked directly for
ASM_OPERANDS instead of indirectly via a VOIDmode operand.

I also think your change would prevent optimizing away an abs if you
had something like this:

(set (reg x) (const_int 5))
(set (reg y) (abs (reg x))

Ulrich can you try this patch instead?

	* combine.c (simplify_rtx, case ABS): Do nothing for ASM_OPERANDS.

Index: combine.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/combine.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 combine.c
*** combine.c	1997/12/07 00:28:07	1.9
--- combine.c	1997/12/11 01:09:22
*************** simplify_rtx (x, op0_mode, last, in_dest
*** 4097,4102 ****
--- 4097,4105 ----
        if (GET_CODE (XEXP (x, 0)) == NEG)
  	SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0));
  
+       if (GET_CODE (XEXP (x, 0)) == ASM_OPERANDS)
+ 	return x;
+ 
        /* If operand is something known to be positive, ignore the ABS.  */
        if (GET_CODE (XEXP (x, 0)) == FFS || GET_CODE (XEXP (x, 0)) == ABS
  	  || ((GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))



More information about the Gcc mailing list