[RISCV] Codegen support for Zfhmin.
authorMonk Chiang <monk.chiang@sifive.com>
Wed, 30 Nov 2022 09:07:14 +0000 (17:07 +0800)
committerMonk Chiang <monk.chiang@sifive.com>
Wed, 7 Dec 2022 06:14:15 +0000 (22:14 -0800)
commit7b50c183601adf8cacf20f3644cb0f72c7cd1125
treebc494f24abadd40d9a359e716ac6c4275744e8f7
parentd42c76aba0f4465cd4ae4ed0c0cc64d141cdf476
[RISCV] Codegen support for Zfhmin.

The Zfhmin subset only has FLH, FSH, FMV.X.H, FMV.H.X, FCVT.S.H, and FCVT.H.S.
If the D extension is present, the FCVT.D.H and FCVT.H.D instructions are also included.
Since most instructions are not included for Zfhmin, so most operations are promoted.
The patch primarily about making f16 a legal type.

RISC-V ISA info:
https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D139391
31 files changed:
llvm/lib/Target/RISCV/RISCV.td
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoZfh.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/test/CodeGen/RISCV/calling-conv-half.ll
llvm/test/CodeGen/RISCV/copysign-casts.ll
llvm/test/CodeGen/RISCV/half-arith-strict.ll
llvm/test/CodeGen/RISCV/half-arith.ll
llvm/test/CodeGen/RISCV/half-bitmanip-dagcombines.ll
llvm/test/CodeGen/RISCV/half-br-fcmp.ll
llvm/test/CodeGen/RISCV/half-convert-strict.ll
llvm/test/CodeGen/RISCV/half-convert.ll
llvm/test/CodeGen/RISCV/half-fcmp-strict.ll
llvm/test/CodeGen/RISCV/half-fcmp.ll
llvm/test/CodeGen/RISCV/half-frem.ll
llvm/test/CodeGen/RISCV/half-imm.ll
llvm/test/CodeGen/RISCV/half-intrinsics.ll
llvm/test/CodeGen/RISCV/half-isnan.ll
llvm/test/CodeGen/RISCV/half-mem.ll
llvm/test/CodeGen/RISCV/half-round-conv-sat.ll
llvm/test/CodeGen/RISCV/half-round-conv.ll
llvm/test/CodeGen/RISCV/half-select-fcmp.ll
llvm/test/CodeGen/RISCV/half-select-icmp.ll
llvm/test/CodeGen/RISCV/rv64zfhmin-half-convert-strict.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rv64zfhmin-half-convert.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/rv64zfhmin-half-intrinsics.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/zfhmin-half-intrinsics-strict.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/zfhmin-half-intrinsics.ll [new file with mode: 0644]
llvm/test/CodeGen/RISCV/zfhmin-imm.ll [new file with mode: 0644]