Previous patches primarily ensured that codegen was possible for the standard RISC-V instructions. However, there are a number of IR inputs that wouldn't be appropriately lowered. This patch both adds test cases and supports lowering for a number of these cases:
- Improved sext/zext/trunc support
- Support for setcc variants that don't map directly to RISC-V instructions
- Lowering mul, and hence support for external symbols
- addc, adde, subc, sube
- mulhs, srem, mulhu, urem, udiv, sdiv
- {srl,sra,shl}_parts
- Bare select
- brind
- br_jt
- cttlz, cttz, ctpop
- rotl, rotr
- BlockAddress
A future patch will fix the TODOs regarding the cases where a register is wasted holding 0.
Period after comment.