[llvm] [AMDGPU] Add f32 cost model for exp/exp2/exp10 intrinsics (PR #185369)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 01:55:08 PDT 2026
================
@@ -755,6 +755,20 @@ GCNTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
return LT.first * NElts * NumOps * get64BitInstrCost(CostKind);
}
+ if (SLT == MVT::f32) {
+ unsigned NElts =
+ LT.second.isVector() ? LT.second.getVectorNumElements() : 1;
----------------
jmmartinez wrote:
The f32 and f64 cases seem to use
```
unsigned NElts =
LT.second.isVector() ? LT.second.getVectorNumElements() : 1;
```
Can we refactor them together to avoid repetition?
https://github.com/llvm/llvm-project/pull/185369
More information about the llvm-commits
mailing list