diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-17 17:03:11 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-17 17:03:11 +0000 |
commit | a79b863a00888e242f9ceda4f1f70a8772ecf727 (patch) | |
tree | 0a832326b76ae184884d7c3a79794d139ce1b70c /gcc/expmed.c | |
parent | 3c444749be61508dd505edbd635ecb386a1c0df3 (diff) | |
download | gcc-a79b863a00888e242f9ceda4f1f70a8772ecf727.tar.gz |
* expmed.c (expand_mult_const): In sanity check, compare only
the bits of val and val_so_far that are significant in the
result mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83294 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index fb590cdf673..ae76695a133 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2610,6 +2610,10 @@ expand_mult_const (enum machine_mode mode, rtx op0, HOST_WIDE_INT val, accum = force_operand (gen_rtx_PLUS (mode, accum, op0), target); } + /* Compare only the bits of val and val_so_far that are significant + in the result mode, to avoid sign-/zero-extension confusion. */ + val &= GET_MODE_MASK (mode); + val_so_far &= GET_MODE_MASK (mode); if (val != val_so_far) abort (); |