diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-03 07:17:57 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-03 07:17:57 +0000 |
commit | b2e894a84ec130c7e8d849728720b29cae1c6063 (patch) | |
tree | 7c2733dc1286e2cdd8fc7e68d42069e0ce1514d7 /gcc | |
parent | f3ff49007a5cebef6e082abc5778875692792cb6 (diff) | |
download | gcc-b2e894a84ec130c7e8d849728720b29cae1c6063.zip gcc-b2e894a84ec130c7e8d849728720b29cae1c6063.tar.gz gcc-b2e894a84ec130c7e8d849728720b29cae1c6063.tar.bz2 |
poly_int: set_inc_state
This trivial patch makes auto-inc-dec.c:set_inc_state take a poly_int64.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
rather than an int.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r256153
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/auto-inc-dec.c | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 37737bc..660d354 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,13 @@ Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> + * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64 + rather than an int. + +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_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. diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c index db1bd5b..93d97f0 100644 --- a/gcc/auto-inc-dec.c +++ b/gcc/auto-inc-dec.c @@ -152,14 +152,14 @@ enum gen_form static rtx mem_tmp; static enum inc_state -set_inc_state (HOST_WIDE_INT val, int size) +set_inc_state (HOST_WIDE_INT val, poly_int64 size) { if (val == 0) return INC_ZERO; if (val < 0) - return (val == -size) ? INC_NEG_SIZE : INC_NEG_ANY; + return known_eq (val, -size) ? INC_NEG_SIZE : INC_NEG_ANY; else - return (val == size) ? INC_POS_SIZE : INC_POS_ANY; + return known_eq (val, size) ? INC_POS_SIZE : INC_POS_ANY; } /* The DECISION_TABLE that describes what form, if any, the increment |