[all-commits] [llvm/llvm-project] 523095: [flang, acc] Support -ffp-maxmin-behavior option in...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Fri Mar 6 12:22:19 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5230955af7934437636c803a6eea328c289399d3
      https://github.com/llvm/llvm-project/commit/5230955af7934437636c803a6eea328c289399d3
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2026-03-06 (Fri, 06 Mar 2026)

  Changed paths:
    M clang/include/clang/Options/Options.td
    M flang/include/flang/Evaluate/common.h
    M flang/include/flang/Frontend/CodeGenOptions.def
    M flang/include/flang/Frontend/CodeGenOptions.h
    M flang/include/flang/Lower/LoweringOptions.def
    M flang/include/flang/Lower/LoweringOptions.h
    M flang/include/flang/Optimizer/Builder/FIRBuilder.h
    M flang/include/flang/Optimizer/Builder/IntrinsicCall.h
    M flang/include/flang/Optimizer/Passes/Pipelines.h
    M flang/include/flang/Semantics/semantics.h
    A flang/include/flang/Support/FPMaxminBehavior.h
    M flang/include/flang/Tools/CrossToolHelpers.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/LoweringOptions.cpp
    M flang/lib/Lower/OpenACC.cpp
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    M flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp
    M flang/lib/Optimizer/Passes/Pipelines.cpp
    M flang/lib/Semantics/semantics.cpp
    M flang/lib/Support/CMakeLists.txt
    A flang/lib/Support/FPMaxminBehavior.cpp
    A flang/test/Driver/ffp-maxmin-behavior.f90
    A flang/test/Lower/OpenACC/acc-reduction-maxmin.f90
    A flang/test/Lower/fp-maxmin-behavior.f90
    M flang/tools/bbc/bbc.cpp
    M flang/tools/tco/tco.cpp
    M mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
    M mlir/test/Dialect/OpenACC/ops.mlir

  Log Message:
  -----------
  [flang,acc] Support -ffp-maxmin-behavior option in lowering. (#184730)

This patch adds `flang -fc1` option `-ffp-maxmin-behavior` and
propagates it throughout Flang, so that semantics context,
lowering and the pass pipeline builder can use it.

MAX/MIN intrinsic and OpenACC max/min reduction lowering
are now controlled by the option.

I kept the `Legacy` mode, which is the default and matches the current
behavior. I am going to test and merge a follow-up patch that
replaces `Legacy` with `Portable`.

RFC:
https://discourse.llvm.org/t/flang-canonical-and-optimizable-representation-for-min-max/90037



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list