[RISCV] Implement convertSelectOfConstantsToMath
The current lowering of select on RISC-V uses a branch instruction to load a
register with one or other value. This is inefficient, especially in the case of
small constants that can be computed easily.
By implementing the TargetLowering::convertSelectOfConstantsToMath hook, some of
the simpler cases are covered that let us avoid introducing a branch in these
Reviewed By: luismarques
Differential Revision: https://reviews.llvm.org/D79260