Strength reduction for operators and conditions.
This is the machine-dependent part of Constprop.
.
.
.
.
Original definition:
Nondetfunction op_strength_reduction
(op: operation) (args: list reg) (vl: list ival) :=
match op, args, vl with
| Oshrximm n, a1::nil, iv1::nil =>
if (int_is_nonnegative iv1)
then ((Oshruimm n), args)
else (op, args)
| Oshrxlimm n, a1::nil, iv1::nil =>
if (long_is_nonnegative iv1)
then ((Oshrluimm n), args)
else (op, args)
| Ocast32signed, a1::nil, iv1::nil =>
if int_is_nonnegative iv1
then (Ocast32unsigned, args)
else (op, args)
| _, _, _ => (op, args)
end.