[llvm] [RISCV] Support select/merge like ops for bf16 vectors when have Zvfbfmin (PR #91936)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 10:36:49 PDT 2024
================
@@ -6700,10 +6718,16 @@ SDValue RISCVTargetLowering::LowerOperation(SDValue Op,
case ISD::BUILD_VECTOR:
return lowerBUILD_VECTOR(Op, DAG, Subtarget);
case ISD::SPLAT_VECTOR:
- if (Op.getValueType().getScalarType() == MVT::f16 &&
- (Subtarget.hasVInstructionsF16Minimal() &&
- !Subtarget.hasVInstructionsF16())) {
- if (Op.getValueType() == MVT::nxv32f16)
+ if ((Op.getValueType().getScalarType() == MVT::f16 &&
+ (Subtarget.hasVInstructionsF16Minimal() &&
+ Subtarget.hasStdExtZfhminOrZhinxmin() &&
+ !Subtarget.hasVInstructionsF16())) ||
+ (Op.getValueType().getScalarType() == MVT::bf16 &&
+ (Subtarget.hasVInstructionsBF16() && Subtarget.hasStdExtZfbfmin() &&
+ Subtarget.hasVInstructionsF16Minimal() &&
----------------
topperc wrote:
Why do we need `hasVInstructionsF16Minimal`?
https://github.com/llvm/llvm-project/pull/91936
More information about the llvm-commits
mailing list