Support for lowering to LLVM for the standard dialect's MaxFOp and MinFOp operations

Hello. I am trying to lower to LLVM the standard dialect’s MaxFOp and MinFOp operations. As I see there is no legalization pattern for them in the StandardToLLVM library (which can be found for example here: llvm-project/StandardToLLVM.cpp at release/14.x · llvm/llvm-project · GitHub).
Could you please tell me how I can lower to LLVM these MaxFOp and MinFOp operations? I am thinking to create a pattern ConvertOpToLLVMPattern and add it to the RewritePatternSet at hand, which is also used as target pattern set for the populateStdToLLVMConversionPatterns() method.
Any advice is welcome.
Thank you very much,
Alex

You can expand these operations into cmpf and select. In modern MLIR, expand-arith pass does that. You’ll need to find the equivalent pass in the version you are using.

Specifically this file llvm-project/ExpandOps.cpp at main · llvm/llvm-project · GitHub