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
18 KiB
18 KiB