[all-commits] [llvm/llvm-project] 23aa5c: Prevent optimizations of math intrinsics in strict...
Serge Pavlov via All-commits
all-commits at lists.llvm.org
Wed Jun 3 11:44:21 PDT 2026
Branch: refs/heads/users/spavloff/bundles.combine
Home: https://github.com/llvm/llvm-project
Commit: 23aa5c7808c6a7c7674d8157113708c6b3d3d0c3
https://github.com/llvm/llvm-project/commit/23aa5c7808c6a7c7674d8157113708c6b3d3d0c3
Author: Serge Pavlov <sepavloff at gmail.com>
Date: 2026-06-04 (Thu, 04 Jun 2026)
Changed paths:
M llvm/include/llvm/Analysis/SimplifyQuery.h
M llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
Log Message:
-----------
Prevent optimizations of math intrinsics in strictfp functions
Previously, the non-constrained forms of math intrinsics were allowed in
strictfp functions. They are treated as the corresponding constrained
functions with the assumed rounding mode 'dynamic' and the exception
handling mode 'strict'. However, their calls are subject to
optimizations, because they look identical to regular intrinsic calls,
the only difference lies in the enclosing function attribute. Many of
these optimizations are inconsistent with the semantics of strictfp
functions.
This change attempts to prevent from unwanted optimizations that involve
math intrinsics in strictfp functions. The partition into allowed and
unwanted optimizations depends on the criteria used for control modes
and exceptions. The criteria used for exception behavior are taken to be
the same as those used in the current implementation based on the
constrained functions. It requires that exceptions must be raised in the
same order and in the same places as they would be when executing the
function on an abstract machine. This is a rather restrictive model, and
many optimizations are inconsistent with it. Using other exception
models could allow more optimizations.
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