llvm-project/llvm/test/Transforms/GVNSink
Nikita Popov 4e545bdb35 [SimplifyCFG] Thread branches on same condition in more cases (PR54980)
SimplifyCFG implements basic jump threading, if a branch is
performed on a phi node with constant operands. However,
InstCombine canonicalizes such phis to the condition value of a
previous branch, if possible. SimplifyCFG does support this as
well, but only in the very limited case where the same condition
is used in a direct predecessor -- notably, this does not include
the common diamond pattern (i.e. two consecutive if/elses on the
same condition).

This patch extends the code to look back a limited number of
blocks to find a branch on the same value, rather than only
looking at the direct predecessor.

Fixes https://github.com/llvm/llvm-project/issues/54980.

Differential Revision: https://reviews.llvm.org/D124159
2022-04-29 09:44:05 +02:00
..
assumption.ll
dither.ll
fpmath.ll
indirect-call.ll
int_sideeffect.ll
operand-mismatch.ll
sink-combine-metadata.ll
sink-common-code.ll [SimplifyCFG] Thread branches on same condition in more cases (PR54980) 2022-04-29 09:44:05 +02:00
struct.ll