From 41557c9e7635308beb8653a7d0b61828fc3da28c Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Fri, 19 Dec 1997 08:53:18 +0000 Subject: [PATCH] combine.c (simplify_rtx, case ABS): Don't get confused by a VOIDmode operand. * combine.c (simplify_rtx, case ABS): Don't get confused by a VOIDmode operand. Another x86 codegen bug exposed by latest glibc. From-SVN: r17152 --- gcc/ChangeLog | 3 +++ gcc/combine.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48ff04514d35..5c4d14fc458a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Fri Dec 19 09:50:30 1997 Bernd Schmidt + * combine.c (simplify_rtx, case ABS): Don't get confused by a + VOIDmode operand. + * i386.c (notice_update_cc): Remove bogus pentium GCC code. Fri Dec 19 09:39:48 1997 Jeffrey A Law (law@cygnus.com) diff --git a/gcc/combine.c b/gcc/combine.c index bcb6fe9c783f..2fd6246e2ef3 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -4036,6 +4036,11 @@ simplify_rtx (x, op0_mode, last, in_dest) if (GET_CODE (XEXP (x, 0)) == NEG) SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0)); + /* If the mode of the operand is VOIDmode (i.e. if it is ASM_OPERANDS), + do nothing. */ + if (GET_MODE (XEXP (x, 0)) == VOIDmode) + break; + /* 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))) -- 2.47.2