projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f61f8a
)
(simplify_binary_operation): Insure that folded >> extends
author
Richard Stallman
<rms@gnu.org>
Wed, 14 Oct 1992 01:20:21 +0000
(
01:20
+0000)
committer
Richard Stallman
<rms@gnu.org>
Wed, 14 Oct 1992 01:20:21 +0000
(
01:20
+0000)
the sign even if the host bootstrap compiler doesn't.
From-SVN: r2446
gcc/cse.c
patch
|
blob
|
history
diff --git
a/gcc/cse.c
b/gcc/cse.c
index 89cd43316e0dd788cda33d1831c7d1512dff2ac9..12255b0e76900e148556f03abc4e3e1e647e6cc2 100644
(file)
--- a/
gcc/cse.c
+++ b/
gcc/cse.c
@@
-3964,6
+3964,12
@@
simplify_binary_operation (code, mode, op0, op1)
return 0;
val = arg0s >> arg1;
+
+ /* Bootstrap compiler may not have sign extended the right shift.
+ Manually extend the sign to insure bootstrap cc matches gcc. */
+ if (arg0s < 0 && arg1 > 0)
+ val |= ((HOST_WIDE_INT) -1) << (HOST_BITS_PER_WIDE_INT - arg1);
+
break;
case ROTATERT: