summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-28 22:01:54 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-28 22:01:54 +0000
commitc601036e96a6fea9556d107c804944822d2bebce (patch)
tree14e729b9052c1fe3a5ad3d88c1cff04aae55b131 /gcc/expmed.c
parent2928e077453fa27de3ca0d12ebc358a27c6078aa (diff)
downloadgcc-c601036e96a6fea9556d107c804944822d2bebce.tar.gz
* expmed.c (const_mult_add_overflow_p): Remove.
* expr.h: Remove the prototype for const_mult_add_overflow_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110334 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index c4797b86f8a..1ad0949fc60 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -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.