From 343d0287f2e4f0360e2c0310b48f94d695ed0e4c Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 4 May 2016 09:41:32 +0930 Subject: [PATCH] Combine simplify_set WORD_REGISTER_OPERATIONS The comment says this test is supposed to prevent "a narrower operation than requested", but it actually only allows a larger subreg not one the same size. Fix that. * combine.c (simplify_set): Correct WORD_REGISTER_OPERATIONS test. From-SVN: r235852 --- gcc/ChangeLog | 4 ++++ gcc/combine.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79fb0f48598..77d81cc5719 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-05-04 Alan Modra + + * combine.c (simplify_set): Correct WORD_REGISTER_OPERATIONS test. + 2016-05-04 Alan Modra PR target/70866 diff --git a/gcc/combine.c b/gcc/combine.c index 0ab3f97db69..3554f515582 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6736,7 +6736,7 @@ simplify_set (rtx x) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)) && (WORD_REGISTER_OPERATIONS || (GET_MODE_SIZE (GET_MODE (src)) - < GET_MODE_SIZE (GET_MODE (SUBREG_REG (src))))) + <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (src))))) #ifdef CANNOT_CHANGE_MODE_CLASS && ! (REG_P (dest) && REGNO (dest) < FIRST_PSEUDO_REGISTER && REG_CANNOT_CHANGE_MODE_P (REGNO (dest), -- 2.30.2