diff mbox series

[090/nnn] poly_int: set_inc_state

Message ID 87zi8heph5.fsf@linaro.org
State New
Headers show
Series [090/nnn] poly_int: set_inc_state | expand

Commit Message

Richard Sandiford Oct. 23, 2017, 5:36 p.m. UTC
This trivial patch makes auto-inc-dec.c:set_inc_state take a poly_int64.


2017-10-23  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.

Comments

Jeff Law Nov. 28, 2017, 8:32 a.m. UTC | #1
On 10/23/2017 11:36 AM, Richard Sandiford wrote:
> This trivial patch makes auto-inc-dec.c:set_inc_state take a poly_int64.

> 

> 

> 2017-10-23  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.

OK.
jeff
diff mbox series

Patch

Index: gcc/auto-inc-dec.c
===================================================================
--- gcc/auto-inc-dec.c	2017-07-27 10:37:54.907033464 +0100
+++ gcc/auto-inc-dec.c	2017-10-23 17:25:36.142940510 +0100
@@ -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 must_eq (val, -size) ? INC_NEG_SIZE : INC_NEG_ANY;
   else
-    return (val == size) ? INC_POS_SIZE : INC_POS_ANY;
+    return must_eq (val, size) ? INC_POS_SIZE : INC_POS_ANY;
 }
 
 /* The DECISION_TABLE that describes what form, if any, the increment