simplify-rtx.c (simplify_const_binary_operation): Fixed shift count trucation.

2012-06-09  Kenneth Zadeck <zadeck@naturalbridge.com>

	* simplify-rtx.c (simplify_const_binary_operation): Fixed shift
	count trucation.

From-SVN: r188359
This commit is contained in:
Kenneth Zadeck 2012-06-09 12:40:40 +00:00 committed by Kenneth Zadeck
parent bca672f610
commit aef2b1d1f0
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-06-09 Kenneth Zadeck <zadeck@naturalbridge.com>
* simplify-rtx.c (simplify_const_binary_operation): Fixed shift
count trucation.
2012-06-08 Richard Henderson <rth@redhat.com>
PR c++/53602

View File

@ -3653,7 +3653,10 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
unsigned HOST_WIDE_INT cnt;
if (SHIFT_COUNT_TRUNCATED)
o1 = double_int_zext (o1, GET_MODE_PRECISION (mode));
{
o1.high = 0;
o1.low &= GET_MODE_PRECISION (mode) - 1;
}
if (!double_int_fits_in_uhwi_p (o1)
|| double_int_to_uhwi (o1) >= GET_MODE_PRECISION (mode))