[all-commits] [llvm/llvm-project] 86077c: [flang][OpenMP] Rewrite min/max with more than 2 a...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Tue Jul 1 07:55:20 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 86077c41a7899fb3a3ce4654bdb373e7cd954f49
https://github.com/llvm/llvm-project/commit/86077c41a7899fb3a3ce4654bdb373e7cd954f49
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2025-07-01 (Tue, 01 Jul 2025)
Changed paths:
M flang/lib/Lower/OpenMP/Atomic.cpp
M flang/test/Lower/OpenMP/atomic-update.f90
A flang/test/Lower/OpenMP/minmax-optional-parameters.f90
Log Message:
-----------
[flang][OpenMP] Rewrite min/max with more than 2 arguments (#146423)
Given an atomic operation `w = max(w, x1, x2, ...)` rewrite it as `w =
max(w, max(x1, x2, ...))`. This will avoid unnecessary non-atomic
comparisons inside of the atomic operation (min/max are expanded
inline).
In particular, if some of the x_i's are optional dummy parameters in the
containing function, this will avoid any presence tests within the
atomic operation.
Fixes https://github.com/llvm/llvm-project/issues/144838
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