Close to getting upward movement of compares working.

Still needs to remove redundant intra-block references
Removes duplicate instructions from the same block