[clang] [flang] [mlir] [flang,acc] Support -ffp-maxmin-behavior option in lowering. (PR #184730)

Tarun Prabhu via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 07:20:38 PST 2026


================
@@ -0,0 +1,52 @@
+! Test lowering of real MIN/MAX with -ffp-maxmin-behavior (legacy, portable, extremum, extremenum).
+! Legacy uses arith.cmpf + arith.select; extremum uses arith.maximumf/minimumf;
+! extremenum uses arith.maxnumf/minnumf; portable with -fno-signed-zeros -menable-no-nans uses maxnumf/minnumf.
+
+! bbc: legacy, extremum, extremenum
+! RUN: bbc -emit-hlfir -o - %s 2>&1 | FileCheck %s -check-prefix=LEGACY
+! RUN: bbc -emit-hlfir -ffp-maxmin-behavior=legacy -o - %s 2>&1 | FileCheck %s -check-prefix=LEGACY
+! RUN: bbc -emit-hlfir -ffp-maxmin-behavior=extremum -o - %s 2>&1 | FileCheck %s -check-prefix=EXTREMUM
+! RUN: bbc -emit-hlfir -ffp-maxmin-behavior=extremenum -o - %s 2>&1 | FileCheck %s -check-prefix=EXTREMENUM
----------------
tarunprabhu wrote:

I believe that @eugeneepshteyn has been replacing the use of `bbc` in the lowering tests with `flang_fc1`. Does this fall into a category of tests where we do want to continue testing with `bbc`?

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


More information about the cfe-commits mailing list