[PATCH] D84995: [AMDGPU][CostModel] Add f16, f64 and contract cases to fused costs estimation.
Daniil Fukalov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 09:20:25 PDT 2020
dfukalov marked 2 inline comments as done.
dfukalov added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:519
+ return TargetTransformInfo::TCC_Free;
+ if (ST->has16BitInsts() && SLT == MVT::f16 && !HasFP64FP16Denormals)
+ return TargetTransformInfo::TCC_Free;
----------------
rampitec wrote:
> I think you do not need to check has16BitInsts(). If it does not f16 would be illegal anyway.
I used it just as it checked in cost estimation for the corresponding FADD/FSUB (below). As I understand, targets without fp16 insts support will not fuse fmul+fadd too. So we should LLVM_FALLTHROUGH for the case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84995/new/
https://reviews.llvm.org/D84995
More information about the llvm-commits
mailing list