CodeGenPrepare will sink most compares to the block that uses then, as an optimization to keep the compare and the branch/select/etc next to on another. This can be blocked by the presence of freeze, however. Usually freeze(icmp(x, C)) is converted to icmp(freeze(x), C)), allowing the cmp to be sunk. If there are multiple uses of the cmp though, this currently doesn't happen.
This patch relaxes that, as the cmp will already be duplicated to be sunk into a different block, we can more aggressively convert the icmp-freeze to freeze-icmp.
Should we factor out this and multiple condition registers check as a separate function so that the check can be shared with sinkCmpExpression?