[PATCH] D80012: [CostModel] Unify Intrinsic Costs.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 18 13:33:58 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:563
                                       TTI::TargetCostKind CostKind) {
+  if (ICA.getID() == Intrinsic::fabs)
+    return 0;
----------------
dfukalov wrote:
> samparker wrote:
> > samparker wrote:
> > > arsenm wrote:
> > > > Previously this would have been reported from TLI.isFAbsFree, but I don't see that check getting dropped here?
> > > I don't recall seeing a check like that... but it makes sense. Having the base implementation call it should work.
> > Okay, so now I see it and it would seem that the logic has changed because of the split and merge with this and D79941. AMDGPUISelLowering doesn't report that fabs vectors are free, so which is true?
> This estimation is good in average. I'm going to add tests and improve this place after your commit. LGTM
Fabs is always free. Eventually vectors break down into scalars that have free fabs uses 


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

https://reviews.llvm.org/D80012





More information about the llvm-commits mailing list