Template simplification of shl, shr, and sar instructions.