[llvm] X86: Improve cost model of fp16 conversion (PR #113195)

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 14:02:42 PDT 2024


================
@@ -3146,6 +3174,11 @@ InstructionCost X86TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
                             TTI::CastContextHint::None, CostKind);
   }
 
+  if (ISD == ISD::FP_ROUND && LTDest.second.getScalarType() == MVT::f16) {
+    // Conversion requires a libcall.
+    return InstructionCost::getInvalid();
----------------
MatzeB wrote:

I hope #114128 fixes this.

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


More information about the llvm-commits mailing list