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
This commit is contained in:
Richard Sandiford 2018-01-03 07:17:57 +00:00 committed by Richard Sandiford
parent f3ff49007a
commit b2e894a84e
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
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>

View file

@ -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