aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-01-29 18:56:35 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2020-01-29 19:15:29 +0000
commit2812a28418b72b24979805cfca1f140dda4963b7 (patch)
treeecd2ef276cc6df3aea9c07a840de551224946d9b /gcc
parente3b60da8e07030b1417067295f047b25015f21f2 (diff)
downloadgcc-2812a28418b72b24979805cfca1f140dda4963b7.zip
gcc-2812a28418b72b24979805cfca1f140dda4963b7.tar.gz
gcc-2812a28418b72b24979805cfca1f140dda4963b7.tar.bz2
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 <richard.sandiford@arm.com> gcc/ Revert: 2020-01-28 Richard Sandiford <richard.sandiford@arm.com> 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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/i386/i386.md2
-rw-r--r--gcc/simplify-rtx.c4
3 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 67d24c7..e2838c0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2020-01-29 Richard Sandiford <richard.sandiford@arm.com>
+
+ Revert:
+
+ 2020-01-28 Richard Sandiford <richard.sandiford@arm.com>
+
+ 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.
+
2020-01-29 Joel Hutton <Joel.Hutton@arm.com>
PR target/93221
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 9f0077d..f83b370 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -8925,7 +8925,7 @@
(define_insn_and_split "*testqi_ext_3"
[(set (match_operand 0 "flags_reg_operand")
(match_operator 1 "compare_operator"
- [(zero_extract:SWI
+ [(zero_extract:SWI248
(match_operand 2 "nonimmediate_operand" "rm")
(match_operand 3 "const_int_operand" "n")
(match_operand 4 "const_int_operand" "n"))
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)))