(simplify_binary_operation, case *SHIFT*): Reduce arg1 as
authortege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 1993 11:46:16 +0000 (11:46 +0000)
committertege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 1993 11:46:16 +0000 (11:46 +0000)
defined by SHIFT_COUNT_TRUNCATED.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6296 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cse.c

index d9bc7d4..936370e 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3844,12 +3844,9 @@ simplify_binary_operation (code, mode, op0, op1)
 
 #ifdef SHIFT_COUNT_TRUNCATED
       if (SHIFT_COUNT_TRUNCATED)
-       arg1 &= (BITS_PER_WORD - 1);
+       arg1 %= width;
 #endif
 
-      if (arg1 >= width)
-       return 0;
-
       val = ((unsigned HOST_WIDE_INT) arg0) >> arg1;
       break;
 
@@ -3860,12 +3857,9 @@ simplify_binary_operation (code, mode, op0, op1)
 
 #ifdef SHIFT_COUNT_TRUNCATED
       if (SHIFT_COUNT_TRUNCATED)
-       arg1 &= (BITS_PER_WORD - 1);
+       arg1 %= width;
 #endif
 
-      if (arg1 >= width)
-       return 0;
-
       val = ((unsigned HOST_WIDE_INT) arg0) << arg1;
       break;
 
@@ -3875,12 +3869,9 @@ simplify_binary_operation (code, mode, op0, op1)
 
 #ifdef SHIFT_COUNT_TRUNCATED
       if (SHIFT_COUNT_TRUNCATED)
-       arg1 &= (BITS_PER_WORD - 1);
+       arg1 %= width;
 #endif
 
-      if (arg1 >= width)
-       return 0;
-
       val = arg0s >> arg1;
 
       /* Bootstrap compiler may not have sign extended the right shift.