[PATCH] D82458: [ARM] Adjust default fp extend and trunc costs

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 02:30:32 PDT 2020


SjoerdMeijer accepted this revision.
SjoerdMeijer added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:253
+  // Single to/from double precision conversions.
+  if (Src->isVectorTy() && ST->hasNEON() &&
+      ((ISD == ISD::FP_ROUND && SrcTy.getScalarType() == MVT::f64 &&
----------------
dmgreen wrote:
> SjoerdMeijer wrote:
> > Quickly looking at this, I was wondering 2 things here:
> > - how about MVE?
> > - and how about f16?
> This is just the bit of code removed from above, put into a better place and with checks for the actual types this was expecting. The old code was obviously written from a time before fp16 and doesn't account for it properly.
> 
> MVE is handled in a different patch. These were all interrelated but split up from D81813.
> 
> FP16 on NEON will fall back to the "1 vcvt per lane" code below, which will be better when fp16 is not present and will give roughly the same numbers when fp16 is present. But that is not what I am trying to fix here, I'm just trying to make sure it's not worse than before.
Ah okay, cheers, I see that now.
Looks reasonable.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82458/new/

https://reviews.llvm.org/D82458





More information about the llvm-commits mailing list