r353501 made it possible to check for the useMovt subtarget
feature without accessing the MachineFunction. Therefore, we
can rewrite the arm_i32imm definition as an IntImmLeaf instead
of a PatLeaf to reduce some of the boilerplate.
Note however that there is currently no support for a GlobalISel-specific
ImmediateCode field, so we must use the same custom code for both
GlobalISel and DAGISel. This gets rid of some duplication in the TableGen
definition, but it forces us to keep both a pointer and a reference to the
subtarget in the ARMInstructionSelector.
That is pretty ugly but it might be a reasonable trade-off, since the TableGen
descriptions should outlive the code in the selector (or in the worst case we
can update to use just the reference when we get rid of DAGISel).