aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2025-02-01 15:14:17 +0800
committerGitHub <noreply@github.com>2025-02-01 15:14:17 +0800
commit3ec6a6b85aed838b7d56bd6843cad52e822b9111 (patch)
tree1839bf8f14c9f1b133a945407c12f6c50f44b7a1 /clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
parent626c23112fe25c1e327f5b17ad94f805588cec1c (diff)
downloadllvm-3ec6a6b85aed838b7d56bd6843cad52e822b9111.zip
llvm-3ec6a6b85aed838b7d56bd6843cad52e822b9111.tar.gz
llvm-3ec6a6b85aed838b7d56bd6843cad52e822b9111.tar.bz2
[InstCombine] Fix FMF propagation in `foldSelectWithFCmpToFabs` (#121580)
Consider the following pattern: ``` %cmp = fcmp <pred> double %x, 0.000000e+00 %negX = fneg <fmf> double %x %sel = select i1 %cmp, double %x, double %negX ``` We cannot propagate ninf from fneg to select since `%negX` may not be chosen. Similarly, we cannot propagate nnan unless `%negX` is guaranteed to be selected when `%x` is NaN. This patch also propagates nnan/ninf from fcmp to avoid regression in `PhaseOrdering/generate-fabs.ll`. Alive2: https://alive2.llvm.org/ce/z/t6U-tA Closes https://github.com/llvm/llvm-project/issues/121430 and https://github.com/llvm/llvm-project/issues/113989.
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp')
0 files changed, 0 insertions, 0 deletions