[llvm] [AMDGPU] Optimize DPP for fmin/fmax functions (PR #195282)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 10:44:29 PDT 2026


================
@@ -489,6 +490,56 @@ static bool isIdentityValue(unsigned OrigMIOp, MachineOperand *OldOpnd) {
     if (OldOpnd->getImm() == 1)
       return true;
     break;
+  case AMDGPU::V_MIN_F32_e32:
+  case AMDGPU::V_MIN_F32_e64:
+    if (static_cast<uint32_t>(OldOpnd->getImm()) ==
+        APFloat::getInf(APFloat::IEEEsingle()).bitcastToAPInt().getZExtValue())
----------------
arsenm wrote:

Might as well just hardcode the constants instead of this dance through casting APFloat 

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


More information about the llvm-commits mailing list