<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/63969>63969</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [mlir][vector][llvm] Improve LLVM lowering of fmin/fmax reductions
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dcaballe
      </td>
    </tr>
</table>

<pre>
    We currently generate llvm [`reduce_fmin`/`reduce_fmax`](https://github.com/llvm/llvm-project/blob/75d71800aa384ee58663d892c325572f5588df2a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp#L601C1-L601C1) intrinsics whose semantics don't match the NaN handling of [`arith.fmin`/`arith.fmax`](https://mlir.llvm.org/docs/Dialects/ArithOps/#arithminf-arithminfop) operations in MLIR. We should generate llvm `reduce_fminimum`/`reduce_fmaximum` intrinsics instead, which have been recently added to LLVM.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU0Fv9CYQ_TX4grKyh8U2Bx-SrCxF2qRSVSXHCsPsmgqDBXi3-fcVZJsm1fcdvhPDA56Y997IGM3ZIQ6EPxB-qOSWZh8GreQkrcVq8vp9eEOqthDQJftOz-gwyITU2stC87O2Dqg3hX-eFuNIWxMYv2Ly74zxA4F-TmmNhN3nGzCeTZq3aaf8QmDMbLflbg3-L1SJwDhZPxEYO667pq9rKVm_R-R92zLdC1AMOO_gxHnf6xNIAuNiTcg8Jr979O6CIRrvCIyvqJIPf_jj8fX58yx9RXdqXQmwY1s3j83dx0JAUONSMC4aFel19hFpxEW6lPc6U3eJLjKpmaYZ6Yt8obN02hp3pv50U0gGk-bdN4H-hX6qT25llwXZ-XAmMGqvIoHxYKRFlXJ5nyl-W2O5zwrhYtzp7rPya_6_X7NjxrtIjaPPx6ffd_QNaZz9ZvX_Df3mplm25UeO3vCvyhgXE0pN4JFeZ6NmOssL0gnR0YDqIztSa9Q0eVrUrvTAtGBCVjg0bS96BoJ31TxMzcT5Cdu9EEzvgTUAyAXvUTUgepCVGaAGVndQ120NrNv1fSca1TLBmz0IJsm-xkUa-ylfZWLccGiZaEVl5YQ2lsgDOLzSckgA8gSEoWRw2s6R7GtrYor_sSSTbJmVEjN-IPzhUgL0UZcQ8wN9WtbgL1japNZfMdzCUAIAY5aQFjmLK9UW7PDLs1E-na0vTf0TAAD__9sMOao">