aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-09-04 16:22:43 +0200
committerGitHub <noreply@github.com>2024-09-04 16:22:43 +0200
commit3bc38fb27a12f785d8e78b8d00cbd277464ace92 (patch)
treed19fe60287d4fceb79b9ef29cd3636f5ad2f2542 /flang/lib/Frontend/CompilerInvocation.cpp
parent8f77d37f256809766fd83a09c6d144b785e9165a (diff)
downloadllvm-3bc38fb27a12f785d8e78b8d00cbd277464ace92.zip
llvm-3bc38fb27a12f785d8e78b8d00cbd277464ace92.tar.gz
llvm-3bc38fb27a12f785d8e78b8d00cbd277464ace92.tar.bz2
[InstCombine] Generalize and consolidate phi translation check (#106051)
The foldOpIntoPhi() transforms requires all operands to be phi-translatable. This can be the case either because they are phi nodes in the same block, or because the operand dominates the block. Currently, most callers of foldOpIntoPhi() satisfy this pre-condition by requiring a constant operand, which trivially dominates everything. Only selects had handling for variable operands. Move this logic into foldOpIntoPhi(), so things are handled correctly if other callers are generalized. Also make the implementation a bit more general by querying the dominator tree.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions