aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1999-08-02 23:53:14 +0000
committerJim Wilson <wilson@gcc.gnu.org>1999-08-02 16:53:14 -0700
commitfae2db4744dd199c7aea8cf48b3ab7a1282e98cc (patch)
tree9bf61dfd34ec2e53b7a7fbb4d336c46731585eeb /gcc
parenta47f48d8fc2ca345f52c851f0ce711d76fcc7a89 (diff)
downloadgcc-fae2db4744dd199c7aea8cf48b3ab7a1282e98cc.zip
gcc-fae2db4744dd199c7aea8cf48b3ab7a1282e98cc.tar.gz
gcc-fae2db4744dd199c7aea8cf48b3ab7a1282e98cc.tar.bz2
Optimize duplicate zero_extend operations.
* combine.c (force_to_mode, case LSHIFTRT): Add goto shiftrt. (force_to_mode, case ASHIFTRT): Add shiftrt label. From-SVN: r28424
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fe7eec1..9592319 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon Aug 2 16:27:42 1999 Jim Wilson <wilson@cygnus.com>
+
+ * combine.c (force_to_mode, case LSHIFTRT): Add goto shiftrt.
+ (force_to_mode, case ASHIFTRT): Add shiftrt label.
+
Tue Aug 3 00:45:02 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* loop.c (strength_reduce): When doing biv->giv conversion, update
diff --git a/gcc/combine.c b/gcc/combine.c
index c9736e5..c922c86 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -6574,7 +6574,8 @@ force_to_mode (x, mode, mask, reg, just_select)
x = gen_binary (LSHIFTRT, GET_MODE (x), XEXP (x, 0),
GEN_INT (GET_MODE_BITSIZE (GET_MODE (x))
- exact_log2 (mask + 1)));
- break;
+
+ goto shiftrt;
case ASHIFTRT:
/* If we are just looking for the sign bit, we don't need this shift at
@@ -6639,7 +6640,9 @@ force_to_mode (x, mode, mask, reg, just_select)
if (mask == 1)
x = gen_binary (LSHIFTRT, GET_MODE (x), XEXP (x, 0), XEXP (x, 1));
- /* If this is a sign-extension operation that just affects bits
+ shiftrt:
+
+ /* If this is a zero- or sign-extension operation that just affects bits
we don't care about, remove it. Be sure the call above returned
something that is still a shift. */