diff options
| author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-19 20:13:20 +0000 |
|---|---|---|
| committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-19 20:13:20 +0000 |
| commit | 675958603e3cabc4cc4e25d6470b00521961320d (patch) | |
| tree | 00ebe901bb960a13502c3619279735ce331441dd | |
| parent | 67055a78b28c138ca7ebffd2ec19251a6174044d (diff) | |
| download | ppe42-gcc-675958603e3cabc4cc4e25d6470b00521961320d.tar.gz ppe42-gcc-675958603e3cabc4cc4e25d6470b00521961320d.zip | |
2002-11-19 �Eric Botcazou �<ebotcazou@libertysurf.fr>
PR c/8588
* optabs.c (expand_binop): Convert CONST_INTs in shift
operations too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59274 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/optabs.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e7721474cf..91f8dc98860 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-11-19 Eric Botcazou <ebotcazou@libertysurf.fr> + + PR c/8588 + * optabs.c (expand_binop): Convert CONST_INTs in shift + operations too. + 2002-11-19 Roger Sayle <roger@eyesopen.com> * gcse.c (gcse_emit_move_after): Correct typo in REG_EQUAL note. diff --git a/gcc/optabs.c b/gcc/optabs.c index 3852b6fe1db..1551ff8e806 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -781,9 +781,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) /* In case the insn wants input operands in modes different from those of the actual operands, convert the operands. It would seem that we don't need to convert CONST_INTs, but we do, so - that they're properly zero-extended or sign-extended for their - modes; shift operations are an exception, because the second - operand need not be extended to the mode of the result. */ + that they're properly zero-extended, sign-extended or truncated + for their mode. */ if (GET_MODE (op0) != mode0 && mode0 != VOIDmode) xop0 = convert_modes (mode0, @@ -796,7 +795,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) xop1 = convert_modes (mode1, GET_MODE (op1) != VOIDmode ? GET_MODE (op1) - : (shift_op ? mode1 : mode), + : mode, xop1, unsignedp); /* Now, if insn's predicates don't allow our operands, put them into @@ -2234,8 +2233,8 @@ expand_twoval_binop (binoptab, op0, op1, targ0, targ1, unsignedp) /* In case the insn wants input operands in modes different from those of the actual operands, convert the operands. It would seem that we don't need to convert CONST_INTs, but we do, so - that they're properly zero-extended or sign-extended for their - modes. */ + that they're properly zero-extended, sign-extended or truncated + for their mode. */ if (GET_MODE (op0) != mode0 && mode0 != VOIDmode) xop0 = convert_modes (mode0, |

