aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-06-17 13:56:15 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-06-17 13:56:15 -0700
commit5c45425b5c27536f42f21ebede0bc7d9b57dce32 (patch)
tree02c530636d8bd158c37193c4b2cd217a3d585bf0 /gcc/expmed.c
parent9aa497ae23a34e2c851c9f3c7e2ad19372b96fae (diff)
downloadgcc-5c45425b5c27536f42f21ebede0bc7d9b57dce32.zip
gcc-5c45425b5c27536f42f21ebede0bc7d9b57dce32.tar.gz
gcc-5c45425b5c27536f42f21ebede0bc7d9b57dce32.tar.bz2
* expmed.c (make_tree): Handle SIGN_EXTEND/ZERO_EXTEND.
From-SVN: r54716
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 60e9c25..8ef4fca 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -4136,6 +4136,13 @@ make_tree (type, x)
build (TRUNC_DIV_EXPR, t,
make_tree (t, XEXP (x, 0)),
make_tree (t, XEXP (x, 1)))));
+
+ case SIGN_EXTEND:
+ case ZERO_EXTEND:
+ t = (*lang_hooks.types.type_for_mode) (GET_MODE (XEXP (x, 0)),
+ GET_CODE (x) == ZERO_EXTEND);
+ return fold (convert (type, make_tree (t, XEXP (x, 0))));
+
default:
t = make_node (RTL_EXPR);
TREE_TYPE (t) = type;