[RISCV64] Emit correct lib call for fp(float/double) to ui/si
authorKamlesh Kumar <kamleshbhalui@gmail.com>
Thu, 18 Jun 2020 13:46:54 +0000 (19:16 +0530)
committerKamlesh Kumar <kamleshbhalui@gmail.com>
Thu, 18 Jun 2020 14:04:16 +0000 (19:34 +0530)
commit7622ea5835f0381a426e504f4c03f11733732b83
tree5da24e146f2e4a8f9afdeb1a90e4dcce380804ab
parentb2f2adee003adf24c88cc2154019422896b96551
[RISCV64] Emit correct lib call for fp(float/double) to ui/si

Since i32 is not legal in riscv64,
it always promoted to i64 before emitting lib call and
for conversions like float/double to int and float/double to unsigned int
wrong lib call was emitted. This commit fix it using custom lowering.

Differential Revision: https://reviews.llvm.org/D80526
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rv64i-single-softfloat.ll