From 2812a28418b72b24979805cfca1f140dda4963b7 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 29 Jan 2020 18:56:35 +0000 Subject: Revert g-465c7c89e92a6d6d582173e505cb16dcb9873034 The patch caused regressions in gcc.target/sh/pr64345-1.c on sh3-linux-gnu and gcc.target/m68k/pr39726.c on m68k-linux-gnu. It didn't look like they would be fixable in an acceptably non-invasive and unhacky way, so punting till future releases. 2020-01-29 Richard Sandiford gcc/ Revert: 2020-01-28 Richard Sandiford PR rtl-optimization/87763 * simplify-rtx.c (simplify_truncation): Extend sign/zero_extract simplification to handle subregs as well as bare regs. * config/i386/i386.md (*testqi_ext_3): Match QI extracts too. --- gcc/simplify-rtx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/simplify-rtx.c') diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index db4f933..eff1d07 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -736,9 +736,7 @@ simplify_truncation (machine_mode mode, rtx op, (*_extract:M1 (truncate:M1 (reg:M2)) (len) (pos')) if possible without changing len. */ if ((GET_CODE (op) == ZERO_EXTRACT || GET_CODE (op) == SIGN_EXTRACT) - && (REG_P (XEXP (op, 0)) - || (SUBREG_P (XEXP (op, 0)) - && REG_P (SUBREG_REG (XEXP (op, 0))))) + && REG_P (XEXP (op, 0)) && GET_MODE (XEXP (op, 0)) == GET_MODE (op) && CONST_INT_P (XEXP (op, 1)) && CONST_INT_P (XEXP (op, 2))) -- cgit v1.1