Consider flags when deciding whether we should extend our operand.

Also moved code into separate function.
This fixes backend/sparc_shr2.c.
bring back (x*c)+x  => x*(c+1) optimisation
introduce ir_bk_may_alias

This can be used to effectively test aliasing in libfirm.
Generalized transform_node_Or_bf_store to arbitrary bitwise operations.