Currently optimizeMemoryInst requires that all of the AddrModes it sees are identical. This patch makes it capable of tracking multiple AddrModes, so long as they differ in at most one field.
This patch does nothing by itself, but later patches will make use of it to insert or reuse phi or select instructions for the differing fields.