aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-05-04 09:41:32 +0930
committerAlan Modra <amodra@gcc.gnu.org>2016-05-04 09:41:32 +0930
commit343d0287f2e4f0360e2c0310b48f94d695ed0e4c (patch)
tree9fa15ef0c727e87fda693b64ffd578e0e16ffdff /gcc
parent475839b6db90ccdb27c0cc56400185cd04e783c3 (diff)
downloadgcc-343d0287f2e4f0360e2c0310b48f94d695ed0e4c.zip
gcc-343d0287f2e4f0360e2c0310b48f94d695ed0e4c.tar.gz
gcc-343d0287f2e4f0360e2c0310b48f94d695ed0e4c.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/combine.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 79fb0f48..77d81cc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2016-05-04 Alan Modra <amodra@gmail.com>
+ * combine.c (simplify_set): Correct WORD_REGISTER_OPERATIONS test.
+
+2016-05-04 Alan Modra <amodra@gmail.com>
+
PR target/70866
* config/rs6000/rs6000.c (rs6000_stack_info): Don't set cr_save_p
when cr2,3,4 are all fixed regs.
diff --git a/gcc/combine.c b/gcc/combine.c
index 0ab3f97..3554f51 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),