expmed.c (expand_mult_const): In sanity check...

* 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.

From-SVN: r83294
This commit is contained in:
Zack Weinberg 2004-06-17 17:03:11 +00:00 committed by Zack Weinberg
parent 1616280e70
commit 42eb30b557
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2004-06-17 Zack Weinberg <zack@codesourcery.com>
* 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.
2004-06-17 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-pre.c: Update comments.
@ -198,7 +204,7 @@
2004-06-16 Daniel Berlin <dberlin@dberlin.org>
* tree-cfg.c (pass_split_crit_edge): Give it a name and a dump file.
2004-06-16 Dale Johannesen <dalej@apple.com>
* loop.c (loop_givs_reduce): Avoid miscompilation of

View file

@ -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 ();