projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02b35b1
)
(force_to_mode): Don't do right-shift in a narrower mode.
author
Richard Stallman
<rms@gnu.org>
Tue, 16 Nov 1993 07:20:33 +0000
(07:20 +0000)
committer
Richard Stallman
<rms@gnu.org>
Tue, 16 Nov 1993 07:20:33 +0000
(07:20 +0000)
From-SVN: r6105
gcc/combine.c
patch
|
blob
|
history
diff --git
a/gcc/combine.c
b/gcc/combine.c
index aed46278c1c5a5cfd315f533037a94ef52539761..1d22a1358b398a02fadbd9731820f7956b374995 100644
(file)
--- a/
gcc/combine.c
+++ b/
gcc/combine.c
@@
-5608,6
+5608,11
@@
force_to_mode (x, mode, mask, reg)
&& (code_to_optab[(int) code]->handlers[(int) mode].insn_code
!= CODE_FOR_nothing))
? mode : GET_MODE (x));
+ /* It is not valid to do a right-shift in a narrower mode
+ than the one it came in with. */
+ if ((code == LSHIFTRT || code == ASHIFTRT)
+ && GET_MODE_BITSIZE (mode) < GET_MODE_BITSIZE (GET_MODE (x)))
+ op_mode = GET_MODE (x);
/* Truncate MASK to fit OP_MODE. */
if (op_mode)