[llvm-branch-commits] [llvm] AMDGPU: Cost model for minimumnum/maximumnum (PR #141946)

Pierre van Houtryve via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 2 00:36:23 PDT 2025


================
@@ -742,6 +744,23 @@ GCNTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
     break;
   case Intrinsic::copysign:
     return NElts * getFullRateInstrCost();
+  case Intrinsic::minimumnum:
+  case Intrinsic::maximumnum: {
+    // Instruction + 2 canonicalizes. For cases that need type promotion, we the
+    // promotion takes the place of the canonicalize.
----------------
Pierre-vh wrote:

```suggestion
    // Instruction + 2 canonicalizes. For cases that need type promotion, the
    // promotion takes the place of the canonicalize.
```

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


More information about the llvm-branch-commits mailing list