Commit 446f52f4 by Graham Stott

combine.c (simplify_shift_const): Check shift amount is a CONST_INT.


	* combine.c(simplify_shift_const): Check shift amount is a
	CONST_INT.

From-SVN: r82644
parent 90aa6719
2004-06-05 Graham Stott <graham.stott@btinternet.com>
* combine.c(simplify_shift_const): Check shift amount is a
CONST_INT.
2004-06-05 Danny Smith <dannysmith@users.sourceforge.net>
* toplev.c (init_asm_output): Add explicit 'b' to mode when
......
......@@ -8763,9 +8763,10 @@ simplify_shift_const (rtx x, enum rtx_code code,
logical expression, make a new logical expression, and apply
the inverse distributive law. This also can't be done
for some (ashiftrt (xor)). */
if (code != ASHIFTRT || GET_CODE (varop)!= XOR
|| 0 <= trunc_int_for_mode (INTVAL (XEXP (varop, 1)),
shift_mode))
if (GET_CODE (XEXP (varop, 1)) == CONST_INT
&& !(code == ASHIFTRT && GET_CODE (varop) == XOR
&& 0 > trunc_int_for_mode (INTVAL (XEXP (varop, 1)),
shift_mode)))
{
rtx lhs = simplify_shift_const (NULL_RTX, code, shift_mode,
XEXP (varop, 0), count);
......@@ -8776,6 +8777,7 @@ simplify_shift_const (rtx x, enum rtx_code code,
varop = apply_distributive_law (varop);
count = 0;
continue;
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment