From: Richard Sandiford Date: Wed, 3 Jan 2018 07:17:57 +0000 (+0000) Subject: poly_int: set_inc_state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2e894a84ec130c7e8d849728720b29cae1c6063;p=gcc.git 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 Alan Hayward David Sherwood 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 Co-Authored-By: David Sherwood From-SVN: r256153 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 37737bcabd9..660d354e49a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-01-03 Richard Sandiford + Alan Hayward + David Sherwood + + * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64 + rather than an int. + 2018-01-03 Richard Sandiford Alan Hayward David Sherwood diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c index db1bd5bba2c..93d97f0cd52 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