]> granicus.if.org Git - llvm/commit
[RISCV] Support and tests for a variety of additional LLVM IR constructs
authorAlex Bradbury <asb@lowrisc.org>
Tue, 21 Nov 2017 08:11:03 +0000 (08:11 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Tue, 21 Nov 2017 08:11:03 +0000 (08:11 +0000)
commitba7bdbf84e7397d7622c1dbf53a92f272686771c
treebb3393c6c0bd931d74f19393dd371644998c1777
parentfbdb03fa563117e46f789f30a043fcf5197ad14a
[RISCV] Support and tests for a variety of additional LLVM IR constructs

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
* brind
* br_jt
* bswap, ctlz, cttz, ctpop
* rotl, rotr
* BlockAddress operands

Differential Revision: https://reviews.llvm.org/D29938

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318737 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
lib/Target/RISCV/RISCVISelLowering.cpp
lib/Target/RISCV/RISCVISelLowering.h
lib/Target/RISCV/RISCVInstrInfo.td
lib/Target/RISCV/RISCVMCInstLower.cpp
test/CodeGen/RISCV/addc-adde-sube-subc.ll [new file with mode: 0644]
test/CodeGen/RISCV/alu32.ll
test/CodeGen/RISCV/blockaddress.ll [new file with mode: 0644]
test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll [new file with mode: 0644]
test/CodeGen/RISCV/div.ll [new file with mode: 0644]
test/CodeGen/RISCV/i32-icmp.ll [new file with mode: 0644]
test/CodeGen/RISCV/indirectbr.ll [new file with mode: 0644]
test/CodeGen/RISCV/jumptable.ll [new file with mode: 0644]
test/CodeGen/RISCV/mul.ll [new file with mode: 0644]
test/CodeGen/RISCV/rem.ll [new file with mode: 0644]
test/CodeGen/RISCV/rotl-rotr.ll [new file with mode: 0644]
test/CodeGen/RISCV/sext-zext-trunc.ll [new file with mode: 0644]
test/CodeGen/RISCV/shifts.ll [new file with mode: 0644]