[flang-commits] [flang] [flang] Avoid optimizing min and max if not valid type (PR #134972)

Miguel Saldivar via flang-commits flang-commits at lists.llvm.org
Thu Apr 10 11:48:08 PDT 2025


Saldivarcher wrote:

> Thank you for fixing this. The change looks good to me once you have added a test.
> 
> I would test this by checking that hlfir.minval etc are not modified by the pass for a few types that aren't integers or floating point. See `flang/test/HLFIR/minval-elemental.fir` for an example test for this pass.

Since `maxval` and `minval` only take arrays of `integer`, `real`, and `character`, wouldn't this new test and the old test cover everything?

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


More information about the flang-commits mailing list