From a80b4f579a10d01a6cfdfff37150cfccd134dc41 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Mon, 5 Dec 2016 14:54:42 +0100 Subject: [PATCH] Subject: [PATCH] Revert "Do not simplify "(and (reg) (const bit)" to if_then_else." * combine.c: Revert r243162. From-SVN: r243256 --- gcc/ChangeLog | 4 ++++ gcc/combine.c | 12 ------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ba0302..1ace8b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-12-05 Segher Boessenkool + + * combine.c: Revert r243162. + 2016-12-05 Paolo Bonzini * match.pd: Simplify X ? C : 0 where C is a power of 2 and diff --git a/gcc/combine.c b/gcc/combine.c index 7ba634a..b429453 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5602,18 +5602,6 @@ combine_simplify_rtx (rtx x, machine_mode op0_mode, int in_dest, && OBJECT_P (SUBREG_REG (XEXP (x, 0))))))) { rtx cond, true_rtx, false_rtx; - unsigned HOST_WIDE_INT nz; - - /* If the operation is an AND wrapped in a SIGN_EXTEND or ZERO_EXTEND with - either operand being just a constant single bit value, do nothing since - IF_THEN_ELSE is likely to increase the expression's complexity. */ - if (HWI_COMPUTABLE_MODE_P (mode) - && pow2p_hwi (nz = nonzero_bits (x, mode)) - && ! ((code == SIGN_EXTEND || code == ZERO_EXTEND) - && GET_CODE (XEXP (x, 0)) == AND - && CONST_INT_P (XEXP (XEXP (x, 0), 0)) - && UINTVAL (XEXP (XEXP (x, 0), 0)) == nz)) - return x; cond = if_then_else_cond (x, &true_rtx, &false_rtx); if (cond != 0 -- 2.7.4