aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-08-30 11:18:12 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-08-30 11:18:12 +0000
commit8a92a3f3841992f9440236861a20c178f01f7c21 (patch)
tree7a7523fce5837628244b032776c67c2f45ea3996 /gcc
parent40c4ef22a7b4b70c64d5ce09d9fc5fba60b49420 (diff)
downloadgcc-8a92a3f3841992f9440236861a20c178f01f7c21.zip
gcc-8a92a3f3841992f9440236861a20c178f01f7c21.tar.gz
gcc-8a92a3f3841992f9440236861a20c178f01f7c21.tar.bz2
[56/77] Use the more specific type when two modes are known to be equal
This patch adjusts a couple of cases in which we had established that two modes were equal and happened to be using the one with the more general type instead of the one with the more specific type. 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * expr.c (expand_expr_real_2): Use word_mode instead of innermode when the two are known to be equal. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r251508
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/expr.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d3d304..15f951f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -2,6 +2,13 @@
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
+ * expr.c (expand_expr_real_2): Use word_mode instead of innermode
+ when the two are known to be equal.
+
+2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
+ Alan Hayward <alan.hayward@arm.com>
+ David Sherwood <david.sherwood@arm.com>
+
* simplify-rtx.c (simplify_const_unary_operation): Use
is_a <scalar_int_mode> instead of checking for a nonzero
precision. Forcibly convert op_mode to a scalar_int_mode
diff --git a/gcc/expr.c b/gcc/expr.c
index 7759ce7..cdebba3 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8679,7 +8679,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
rtx htem, hipart;
op0 = expand_normal (treeop0);
if (TREE_CODE (treeop1) == INTEGER_CST)
- op1 = convert_modes (innermode, mode,
+ op1 = convert_modes (word_mode, mode,
expand_normal (treeop1),
TYPE_UNSIGNED (TREE_TYPE (treeop1)));
else
@@ -8690,8 +8690,8 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
goto widen_mult_const;
temp = expand_binop (mode, other_optab, op0, op1, target,
unsignedp, OPTAB_LIB_WIDEN);
- hipart = gen_highpart (innermode, temp);
- htem = expand_mult_highpart_adjust (innermode, hipart,
+ hipart = gen_highpart (word_mode, temp);
+ htem = expand_mult_highpart_adjust (word_mode, hipart,
op0, op1, hipart,
zextend_p);
if (htem != hipart)