This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] simplify_replace_rtx
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] simplify_replace_rtx
- From: Catherine Moore <clm at redhat dot com>
- Date: Thu, 19 Jul 2001 09:58:41 -0700
- Cc: clm at redhat dot com
libiberty/make-temp-file.c was aborting (v850-elf) in
simplify_relational_operation due to an incorrect
mode. This patch corrects the call to
simplify_gen_relational in simplify_replace_rtx. The
compare mode should be determined after the operands
are potentially simplified instead of before.
Bootstrapped for i686-pc-linux-gnu.
Okay to commit?
Catherine
2001-07-19 Catherine Moore <clm@redhat.com>
* simplify-rtx.c (simplify_replace_rtx): Determine mode based
on simplified operands.
Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/simplify-rtx.c,v
retrieving revision 1.69
diff -p -r1.69 simplify-rtx.c
*** simplify-rtx.c 2001/07/17 15:11:56 1.69
--- simplify-rtx.c 2001/07/19 16:13:18
*************** simplify_replace_rtx (x, old, new)
*** 247,260 ****
simplify_replace_rtx (XEXP (x, 0), old, new),
simplify_replace_rtx (XEXP (x, 1), old, new));
case '<':
! return
! simplify_gen_relational (code, mode,
! (GET_MODE (XEXP (x, 0)) != VOIDmode
! ? GET_MODE (XEXP (x, 0))
! : GET_MODE (XEXP (x, 1))),
! simplify_replace_rtx (XEXP (x, 0), old, new),
! simplify_replace_rtx (XEXP (x, 1), old, new));
!
case '3':
case 'b':
return
--- 247,262 ----
simplify_replace_rtx (XEXP (x, 0), old, new),
simplify_replace_rtx (XEXP (x, 1), old, new));
case '<':
! {
! rtx new_op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
! rtx new_op1 = simplify_replace_rtx (XEXP (x, 0), old, new);
! enum machine_mode new_mode = (GET_MODE (new_op0) != VOIDmode)
! ? GET_MODE (new_op0)
! : GET_MODE (new_op1);
! return
! simplify_gen_relational (code, mode, new_mode,
! new_op0, new_op1);
! }
case '3':
case 'b':
return