[PATCH] D90738: [RISCV] Support Zfh half-precision floating-point extension.
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 09:45:32 PST 2020
jrtc27 accepted this revision.
jrtc27 added a comment.
This revision is now accepted and ready to land.
Couple of minor changes but otherwise LGTM.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2236-2241
+ if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f32)
Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTW_RV64, DL, MVT::i64, Val);
- break;
- }
- Val = DAG.getNode(ISD::BITCAST, DL, LocVT, Val);
+ else if (VA.getLocVT() == MVT::i64 && VA.getValVT() == MVT::f16)
+ Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTH_RV64, DL, MVT::i64, Val);
+ else if (VA.getLocVT() == MVT::i32 && VA.getValVT() == MVT::f16)
+ Val = DAG.getNode(RISCVISD::FMV_X_ANYEXTH_RV32, DL, MVT::i32, Val);
----------------
Sorry for continuing to nitpick (and not spotting this first time) but could you please sort these (probably by ValVT then LocVT is best)?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3096-3099
+ NODE_NAME_CASE(FMV_H_X_RV32)
+ NODE_NAME_CASE(FMV_H_X_RV64)
+ NODE_NAME_CASE(FMV_X_ANYEXTH_RV32)
+ NODE_NAME_CASE(FMV_X_ANYEXTH_RV64)
----------------
In a similar vein, put these before the W versions?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90738/new/
https://reviews.llvm.org/D90738
More information about the llvm-commits
mailing list