Commit 4879acf6 by Jim Wilson

(simplify_unary_operation): Cast constant 1 to HOST_WIDE_INT

before shifting left to form mask.

From-SVN: r8707
parent 0d6fc1be
...@@ -3078,7 +3078,7 @@ simplify_unary_operation (code, mode, op, op_mode) ...@@ -3078,7 +3078,7 @@ simplify_unary_operation (code, mode, op, op_mode)
if (width < HOST_BITS_PER_WIDE_INT if (width < HOST_BITS_PER_WIDE_INT
&& ((val & ((HOST_WIDE_INT) (-1) << (width - 1))) && ((val & ((HOST_WIDE_INT) (-1) << (width - 1)))
!= ((HOST_WIDE_INT) (-1) << (width - 1)))) != ((HOST_WIDE_INT) (-1) << (width - 1))))
val &= (1 << width) - 1; val &= ((HOST_WIDE_INT) 1 << width) - 1;
return GEN_INT (val); return GEN_INT (val);
} }
......
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