[RISCV] Add RV64F codegen support
authorAlex Bradbury <asb@lowrisc.org>
Thu, 31 Jan 2019 22:48:38 +0000 (22:48 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Thu, 31 Jan 2019 22:48:38 +0000 (22:48 +0000)
commitd834d8301d7d2219f4c6c29e7e0906d18a52fbe3
treec42e61ebbeef8b5566ecb6a37aee8dbc903d5171
parentc0affde863665ac198366956a56742321537f319
[RISCV] Add RV64F codegen support

This requires a little extra work due tothe fact i32 is not a legal type. When
call lowering happens post-legalisation (e.g. when an intrinsic was inserted
during legalisation). A bitcast from f32 to i32 can't be introduced. This is
similar to the challenges with RV32D. To handle this, we introduce
target-specific DAG nodes that perform bitcast+anyext for f32->i64 and
trunc+bitcast for i64->f32.

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

llvm-svn: 352807
13 files changed:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoF.td
llvm/test/CodeGen/RISCV/float-arith.ll
llvm/test/CodeGen/RISCV/float-bitmanip-dagcombines.ll
llvm/test/CodeGen/RISCV/float-br-fcmp.ll
llvm/test/CodeGen/RISCV/float-convert.ll
llvm/test/CodeGen/RISCV/float-fcmp.ll
llvm/test/CodeGen/RISCV/float-imm.ll
llvm/test/CodeGen/RISCV/float-mem.ll
llvm/test/CodeGen/RISCV/float-select-fcmp.ll
llvm/test/CodeGen/RISCV/rv32i-rv64i-float-double.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rv64f-float-convert.ll [new file with mode: 0644]