[llvm] [RISCV][TTI] Support cost of f16 FCmp using zvfhmin in the absence of… (PR #89166)

Jianjian Guan via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 00:42:40 PDT 2024


================
@@ -1398,12 +1398,28 @@ InstructionCost RISCVTTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
     // one which will calculate as:
     // ScalarizeCost + Num * Cost for fixed vector,
     // InvalidCost for scalable vector.
-    if ((ValTy->getScalarSizeInBits() == 16 && !ST->hasVInstructionsF16()) ||
+    if ((ValTy->getScalarSizeInBits() == 16 && !ST->hasVInstructionsF16() &&
+         !ST->hasVInstructionsF16Minimal()) ||
----------------
jacquesguan wrote:

Using `hasVInstructionsF16Minimal` is enough since zvfh implies zvfhmin in llvm now.

https://github.com/llvm/llvm-project/pull/89166


More information about the llvm-commits mailing list