[llvm] [AMDGPU] Fold fmed3 when inputs include infinity (PR #144824)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 22:40:13 PDT 2025


================
@@ -1088,6 +1087,45 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
       case KnownIEEEMode::Unknown:
         break;
       }
+    } else if (match(Src0, m_APFloat(ConstSrc0)) && ConstSrc0->isInfinity()) {
----------------
arsenm wrote:

Can you merge this case with the nan handling above? The m_APFloat matcher already matched. If this is treated as a separate case, this should use the nicer m_Inf matcher 

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


More information about the llvm-commits mailing list