From 7d103eb5d4826dd66a937ee67eabf24256ed54bb Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Thu, 30 Sep 2004 23:44:30 +0000 Subject: [PATCH] combine.c (force_to_mode): Only convert the expression (AND (NE FOO 0) CONST) into (AND FOO CONST) if... * combine.c (force_to_mode) : Only convert the expression (AND (NE FOO 0) CONST) into (AND FOO CONST) if FOO has the same machine mode as the result. From-SVN: r88369 --- gcc/ChangeLog | 6 ++++++ gcc/combine.c | 1 + 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b91dbefa14e..0bc08118193 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-30 Roger Sayle + + * combine.c (force_to_mode) : Only convert the expression + (AND (NE FOO 0) CONST) into (AND FOO CONST) if FOO has the same + machine mode as the result. + 2004-09-30 Ben Elliston PR bootstrap/17761 diff --git a/gcc/combine.c b/gcc/combine.c index 2c7fbf5e74d..559ee153136 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7338,6 +7338,7 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, in STORE_FLAG_VALUE and FOO has a single bit that might be nonzero, which is equal to STORE_FLAG_VALUE. */ if ((mask & ~STORE_FLAG_VALUE) == 0 && XEXP (x, 1) == const0_rtx + && GET_MODE (XEXP (x, 0)) == mode && exact_log2 (nonzero_bits (XEXP (x, 0), mode)) >= 0 && (nonzero_bits (XEXP (x, 0), mode) == (unsigned HOST_WIDE_INT) STORE_FLAG_VALUE))