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.