CodeGen: Make the global-merge pass independently testable, and add a test.

llvm-svn: 270023
3 files changed