Simplify mask calculation in transform_bitop_chain().
Improve transformation in transform_bitop_chain().

In particular create a single Not or Or if the masks permit it and normalise towards And+Eor.
a op X CMP b op X ==> a CMP b works for Eor, too, not just add.
Use complement_values().
Improve complement_values(): Consider Eor(x, c) and Eor(x, ~c).
Replace tp_ent_pair for the parameter and result types of struct mtd_attr by just ir_type*.

The entity was never used.
Add local normalisation: x << c -> x * (1 << c).

Remove this normalisation from reassociation.