aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-03-06 09:33:51 +0100
committerGitHub <noreply@github.com>2024-03-06 09:33:51 +0100
commit9f45c5e1a65a1abf4920b617d36ed05e73c04bea (patch)
tree2d86d6ce7f7c160ab3f65be0b8a2668bbff0fbe3 /clang/lib/Sema/DeclSpec.cpp
parent7a0acccd81df268dc7ad4c0358c42552789f19b4 (diff)
downloadllvm-9f45c5e1a65a1abf4920b617d36ed05e73c04bea.zip
llvm-9f45c5e1a65a1abf4920b617d36ed05e73c04bea.tar.gz
llvm-9f45c5e1a65a1abf4920b617d36ed05e73c04bea.tar.bz2
[InstCombine] Fix infinite loop in select equivalence fold (#84036)
When replacing with a non-constant, it's possible that the result of the simplification is actually more complicated than the original, and may result in an infinite combine loop. Mitigate the issue by requiring that either the replacement or simplification result is constant, which should ensure that it's simpler. While this check is crude, it does not appear to cause optimization regressions in real-world code in practice. Fixes https://github.com/llvm/llvm-project/issues/83127.
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
0 files changed, 0 insertions, 0 deletions