aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAlex MacLean <amaclean@nvidia.com>2025-06-13 11:16:44 -0700
committerGitHub <noreply@github.com>2025-06-13 11:16:44 -0700
commit59388fb0b92d7efd5737efd6c7b6d5c82f1bc6a8 (patch)
treedc613674a3bbaa893ca44d34905825c399331a0c /clang/lib/CodeGen/CodeGenModule.cpp
parentf6bf3bd5e001918780e7b1e8fceeb02604d65783 (diff)
downloadllvm-59388fb0b92d7efd5737efd6c7b6d5c82f1bc6a8.zip
llvm-59388fb0b92d7efd5737efd6c7b6d5c82f1bc6a8.tar.gz
llvm-59388fb0b92d7efd5737efd6c7b6d5c82f1bc6a8.tar.bz2
[InstCombine] Preserve NSW/NUW flags when folding const BOp with min/max (#143471)
When folding `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1`, if NUW/NSW flags are present on `X BOp C1` and could be safely applied to `C2 BOp C1`, then they may be added on the BOp after the fold is complete. https://alive2.llvm.org/ce/z/n_3aNJ Preserving these flags can allow subsequent transforms to re-order the min/max and BOp, which in the case of NVPTX would allow for some potential future transformations which would improve instruction-selection.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions