[RISCV] Mark FREM as Expand
authorAlex Bradbury <asb@lowrisc.org>
Thu, 15 Nov 2018 14:46:11 +0000 (14:46 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Thu, 15 Nov 2018 14:46:11 +0000 (14:46 +0000)
commit7727240438429813a1b61cd17370dbd9343f068d
treea62bd20e6f1863dd70e14751c85f550c6826d459
parentd6965174d53ff772f4e92228610030ac591ac38e
[RISCV] Mark FREM as Expand

Mark the FREM SelectionDAG node as Expand, which is necessary in order to
support the frem IR instruction on RISC-V. This is expanded into a library
call. Adds the corresponding test. Previously, this would have triggered an
assertion at instruction selection time.

Differential Revision: https://reviews.llvm.org/D54159
Patch by Luís Marques.

llvm-svn: 346958
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/double-frem.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/float-frem.ll [new file with mode: 0644]