Files
clang-p2996/llvm/test/Transforms/DivRemPairs
Owen Anderson 88e85aa580 Handle simple diamond CFG hoisting in DivRemPairs.
Previous we only handled triangle CFGs. This patch expands that
to support diamonds, where the div and rem appear in the then/else
sides of a condition. In that case, we can hoist the div into the
shared predecessor.

This could be generalized further to use nearest common ancestors,
but some of the conditions for hoisting would then require
post-dominator information.

Reviewed By: nikic, lebedev.ri

Differential Revision: https://reviews.llvm.org/D140647
2022-12-28 11:24:18 -07:00
..