[PATCH] D150253: [RISCV] Add Zvfhmin extension.
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 13:31:25 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1018
+ if (VT.getVectorElementType() == MVT::f16 &&
+ !Subtarget.hasVInstructionsF16()) {
----------------
This needs to be below `By default everything must be expanded.`
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2096
case MVT::f16:
- return Subtarget.hasVInstructionsF16();
+ return Subtarget.hasVInstructionsF16Mininal();
case MVT::f32:
----------------
Is this correct? This function is called by `RISCVTargetTransformInfo::isLegalToVectorizeReduction`, `isLegalMaskedLoadStore`, `isLegalMaskedGatherScatter`.
================
Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.h:162
+ bool hasVInstructionsF16Mininal() const {
+ return HasStdExtZvfhmin || HasStdExtZvfh;
+ }
----------------
Doesn't HasStdExtZvfh already imply HasStdExtZvfhmin?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150253/new/
https://reviews.llvm.org/D150253
More information about the cfe-commits
mailing list