diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-03 07:17:52 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-03 07:17:52 +0000 |
commit | f3ff49007a5cebef6e082abc5778875692792cb6 (patch) | |
tree | 64d7ed8be45b1888ab20d2b3fbbdebc73bd10f91 /gcc | |
parent | 0fd03b44ab4d77f8b8c09e5bbc2def4eeb855053 (diff) | |
download | gcc-f3ff49007a5cebef6e082abc5778875692792cb6.zip gcc-f3ff49007a5cebef6e082abc5778875692792cb6.tar.gz gcc-f3ff49007a5cebef6e082abc5778875692792cb6.tar.bz2 |
poly_int: expand_expr_real_1
This patch makes the VIEW_CONVERT_EXPR handling in expand_expr_real_1
cope with polynomial type and mode sizes.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* expr.c (expand_expr_real_1): Use tree_to_poly_uint64
instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
via stack temporaries. Treat the mode size as polynomial too.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r256152
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/expr.c | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6cef622..37737bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,14 @@ Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> + * expr.c (expand_expr_real_1): Use tree_to_poly_uint64 + instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs + via stack temporaries. Treat the mode size as polynomial too. + +2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> + * expr.c (expand_expr_real_2): When handling conversions involving unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE @@ -11132,9 +11132,10 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, else if (STRICT_ALIGNMENT) { tree inner_type = TREE_TYPE (treeop0); - HOST_WIDE_INT temp_size - = MAX (int_size_in_bytes (inner_type), - (HOST_WIDE_INT) GET_MODE_SIZE (mode)); + poly_uint64 mode_size = GET_MODE_SIZE (mode); + poly_uint64 op0_size + = tree_to_poly_uint64 (TYPE_SIZE_UNIT (inner_type)); + poly_int64 temp_size = upper_bound (op0_size, mode_size); rtx new_rtx = assign_stack_temp_for_type (mode, temp_size, type); rtx new_with_op0_mode |