diff mbox

[wide-int,committed] Remove remaining "wide_int (x)"s

Message ID 87fvqrgpm8.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com
State New
Headers show

Commit Message

Richard Sandiford Nov. 20, 2013, 1:38 p.m. UTC
One simple switch to wi::add and one simplification that became possible
after Kenny's patch to remove the other real_from_integer.

Tested on x86_64-linux-gnu and applied as obvious (I hope).

Thanks,
Richard

Comments

Mike Stump Nov. 20, 2013, 5:53 p.m. UTC | #1
On Nov 20, 2013, at 5:38 AM, Richard Sandiford <rsandifo@linux.vnet.ibm.com> wrote:
> One simple switch to wi::add and one simplification that became possible
> after Kenny's patch to remove the other real_from_integer.
> 
> Tested on x86_64-linux-gnu and applied as obvious (I hope).

Look good.
diff mbox

Patch

Index: gcc/objc/objc-act.c
===================================================================
--- gcc/objc/objc-act.c	2013-11-20 12:04:28.937491368 +0000
+++ gcc/objc/objc-act.c	2013-11-20 13:35:05.663472662 +0000
@@ -4885,7 +4885,8 @@  objc_decl_method_attributes (tree *node,
 		  number = TREE_VALUE (second_argument);
 		  if (number && TREE_CODE (number) == INTEGER_CST)
 		    TREE_VALUE (second_argument)
-		      = wide_int_to_tree (TREE_TYPE (number), wide_int (number) + 2);
+		      = wide_int_to_tree (TREE_TYPE (number),
+					  wi::add (number, 2));
 
 		  /* This is the third argument, the "first-to-check",
 		     which specifies the index of the first argument to
@@ -4895,7 +4896,8 @@  objc_decl_method_attributes (tree *node,
 		  number = TREE_VALUE (third_argument);
 		  if (number && TREE_CODE (number) == INTEGER_CST)
 		    TREE_VALUE (third_argument)
-		      = wide_int_to_tree (TREE_TYPE (number), wide_int (number) + 2);
+		      = wide_int_to_tree (TREE_TYPE (number),
+					  wi::add (number, 2));
 		}
 	      filtered_attributes = chainon (filtered_attributes,
 					     new_attribute);
@@ -4930,7 +4932,8 @@  objc_decl_method_attributes (tree *node,
 		  if (number && TREE_CODE (number) == INTEGER_CST
 		      && !wi::eq_p (number, 0))
 		    TREE_VALUE (argument)
-		      = wide_int_to_tree (TREE_TYPE (number), wide_int (number) + 2);
+		      = wide_int_to_tree (TREE_TYPE (number),
+					  wi::add (number, 2));
 		  argument = TREE_CHAIN (argument);
 		}
 
Index: gcc/tree.c
===================================================================
--- gcc/tree.c	2013-11-20 12:55:04.109302505 +0000
+++ gcc/tree.c	2013-11-20 13:35:05.677472558 +0000
@@ -1711,8 +1711,8 @@  real_value_from_int_cst (const_tree type
      bitwise comparisons to see if two values are the same.  */
   memset (&d, 0, sizeof d);
 
-  real_from_integer (&d, type ? TYPE_MODE (type) : VOIDmode,
-		     wide_int (i), TYPE_SIGN (TREE_TYPE (i)));
+  real_from_integer (&d, type ? TYPE_MODE (type) : VOIDmode, i,
+		     TYPE_SIGN (TREE_TYPE (i)));
   return d;
 }