Commit 2dfd595d by Richard Kenner

(fold_truthop): Commute unextend and convert on l_const and r_const.

From-SVN: r10065
parent 1a16a053
...@@ -2866,7 +2866,7 @@ fold_truthop (code, truth_type, lhs, rhs) ...@@ -2866,7 +2866,7 @@ fold_truthop (code, truth_type, lhs, rhs)
if (l_const) if (l_const)
{ {
l_const = convert (type, unextend (l_const, ll_bitsize, ll_unsignedp)); l_const = unextend (convert (type, l_const), ll_bitsize, ll_unsignedp);
l_const = const_binop (LSHIFT_EXPR, l_const, size_int (xll_bitpos), 0); l_const = const_binop (LSHIFT_EXPR, l_const, size_int (xll_bitpos), 0);
if (! integer_zerop (const_binop (BIT_AND_EXPR, l_const, if (! integer_zerop (const_binop (BIT_AND_EXPR, l_const,
fold (build1 (BIT_NOT_EXPR, fold (build1 (BIT_NOT_EXPR,
...@@ -2883,7 +2883,7 @@ fold_truthop (code, truth_type, lhs, rhs) ...@@ -2883,7 +2883,7 @@ fold_truthop (code, truth_type, lhs, rhs)
} }
if (r_const) if (r_const)
{ {
r_const = convert (type, unextend (r_const, rl_bitsize, rl_unsignedp)); r_const = unextend (convert (type, r_const), rl_bitsize, rl_unsignedp);
r_const = const_binop (LSHIFT_EXPR, r_const, size_int (xrl_bitpos), 0); r_const = const_binop (LSHIFT_EXPR, r_const, size_int (xrl_bitpos), 0);
if (! integer_zerop (const_binop (BIT_AND_EXPR, r_const, if (! integer_zerop (const_binop (BIT_AND_EXPR, r_const,
fold (build1 (BIT_NOT_EXPR, fold (build1 (BIT_NOT_EXPR,
......
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