expmed.c (const_mult_add_overflow_p): Remove.
authorKazu Hirata <kazu@codesourcery.com>
Sat, 28 Jan 2006 22:01:54 +0000 (22:01 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sat, 28 Jan 2006 22:01:54 +0000 (22:01 +0000)
* expmed.c (const_mult_add_overflow_p): Remove.
* expr.h: Remove the prototype for const_mult_add_overflow_p.

From-SVN: r110334

gcc/ChangeLog
gcc/expmed.c
gcc/expr.h

index 2f0fe91f0d1a0d5f41be122741b31b29ddef9b78..f7210c4f4db82c16fd850bfbf121f89bee0a0939 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-28  Kazu Hirata  <kazu@codesourcery.com>
+
+       * expmed.c (const_mult_add_overflow_p): Remove.
+       * expr.h: Remove the prototype for const_mult_add_overflow_p.
+
 2006-01-28  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): -msoft-float
index c4797b86f8a866cb97ac210596c4d29642ace74c..1ad0949fc608bb8e48daad75bedbd5ef258532bc 100644 (file)
@@ -5025,44 +5025,6 @@ make_tree (tree type, rtx x)
     }
 }
 
-/* Check whether the multiplication X * MULT + ADD overflows.
-   X, MULT and ADD must be CONST_*.
-   MODE is the machine mode for the computation.
-   X and MULT must have mode MODE.  ADD may have a different mode.
-   So can X (defaults to same as MODE).
-   UNSIGNEDP is nonzero to do unsigned multiplication.  */
-
-bool
-const_mult_add_overflow_p (rtx x, rtx mult, rtx add,
-                          enum machine_mode mode, int unsignedp)
-{
-  tree type, mult_type, add_type, result;
-
-  type = lang_hooks.types.type_for_mode (mode, unsignedp);
-
-  /* In order to get a proper overflow indication from an unsigned
-     type, we have to pretend that it's a sizetype.  */
-  mult_type = type;
-  if (unsignedp)
-    {
-      /* FIXME:It would be nice if we could step directly from this
-        type to its sizetype equivalent.  */
-      mult_type = build_distinct_type_copy (type);
-      TYPE_IS_SIZETYPE (mult_type) = 1;
-    }
-
-  add_type = (GET_MODE (add) == VOIDmode ? mult_type
-             : lang_hooks.types.type_for_mode (GET_MODE (add), unsignedp));
-
-  result = fold_build2 (PLUS_EXPR, mult_type,
-                       fold_build2 (MULT_EXPR, mult_type,
-                                    make_tree (mult_type, x),
-                                    make_tree (mult_type, mult)),
-                       make_tree (add_type, add));
-
-  return TREE_CONSTANT_OVERFLOW (result);
-}
-
 /* Return an rtx representing the value of X * MULT + ADD.
    TARGET is a suggestion for where to store the result (an rtx).
    MODE is the machine mode for the computation.
index ef4238787b6795ca95dcf3904dfb1f8565af0df2..6d09644a048dfe28d21d9d2d0b8741d795b626b3 100644 (file)
@@ -722,7 +722,6 @@ extern rtx extract_bit_field (rtx, unsigned HOST_WIDE_INT,
                              unsigned HOST_WIDE_INT, int, rtx,
                              enum machine_mode, enum machine_mode);
 extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int);
-extern bool const_mult_add_overflow_p (rtx, rtx, rtx, enum machine_mode, int);
 extern rtx expand_mult_add (rtx, rtx, rtx, rtx,enum machine_mode, int);
 extern rtx expand_mult_highpart_adjust (enum machine_mode, rtx, rtx, rtx, rtx, int);