This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: another IEE related problem
- To: egcs at cygnus dot com
- Subject: Re: another IEE related problem
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 10 Dec 1997 18:13:26 -0700
- cc: Ulrich Drepper <drepper at ipd dot info dot uni-karlsruhe dot de>, kenner at vlsi1 dot ultra dot nyu dot edu
- Reply-To: egcs at cygnus dot com
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)))