diff options
author | Nikita Popov <npopov@redhat.com> | 2024-03-06 09:33:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 09:33:51 +0100 |
commit | 9f45c5e1a65a1abf4920b617d36ed05e73c04bea (patch) | |
tree | 2d86d6ce7f7c160ab3f65be0b8a2668bbff0fbe3 /clang/lib/Sema/DeclSpec.cpp | |
parent | 7a0acccd81df268dc7ad4c0358c42552789f19b4 (diff) | |
download | llvm-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