diff options
author | Nikita Popov <npopov@redhat.com> | 2022-09-30 12:13:40 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-10-05 14:00:19 +0200 |
commit | e94619b955104841cc2a4a6febe4025ee140194e (patch) | |
tree | ab2bb49943300de3a97052b4910aa356dbb62610 /clang/lib/Sema/SemaOpenMP.cpp | |
parent | d0dcbb9b026af47378ad0603a45663fad9d8e9c2 (diff) | |
download | llvm-e94619b955104841cc2a4a6febe4025ee140194e.zip llvm-e94619b955104841cc2a4a6febe4025ee140194e.tar.gz llvm-e94619b955104841cc2a4a6febe4025ee140194e.tar.bz2 |
Reapply [InstCombine] Switch foldOpIntoPhi() to use InstSimplify
The infinite loop seen on buildbots should be fixed by
11897708c0229c92802e747564e7c34b722f045f (assuming there are not
multiple infinite combine loops...)
-----
foldOpIntoPhi() currently only folds operations into the phi if all
but one operands constant-fold. The two exceptions to this are freeze
and select, where we allow more general simplification.
This patch makes foldOpIntoPhi() generally simplification based and
removes all the instruction-specific logic. We just try to simplify
the instruction for each operand, and for the (potentially) one
non-simplified operand, we move it into the new block with adjusted
operands.
This fixes https://github.com/llvm/llvm-project/issues/57448, which
was my original motivation for the change.
Differential Revision: https://reviews.llvm.org/D134954
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
0 files changed, 0 insertions, 0 deletions