Merging r293542:
------------------------------------------------------------------------
r293542 | arsenm | 2017-01-30 11:50:17 -0800 (Mon, 30 Jan 2017) | 7 lines
LSR: Don't drop address space when type doesn't match
For targets with different addressing modes in each address space,
if this is dropped querying isLegalAddressingMode later with this
will give a nonsense result, breaking the isLegalUse assertions.
This is a candidate for the 4.0 release branch.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@293819
91177308-0d34-0410-b5e6-
96231b3b80d8