LoopStrengthReduce: Try to pass address space to isLegalAddressingMode
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 15 Aug 2015 00:53:06 +0000 (00:53 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 15 Aug 2015 00:53:06 +0000 (00:53 +0000)
commit4861e30522c3c74aec7b02a224f7434196961ab7
tree25e629d125d269a3ebae4026283762ae4fc51faa
parent5ba7cf9de08356adbb5ae0b34f0b4f0f2d8d7ff0
LoopStrengthReduce: Try to pass address space to isLegalAddressingMode

This seems to only work some of the time. In some situations,
this seems to use a nonsensical type and isn't actually aware of the
memory being accessed. e.g. if branch condition is an icmp of a pointer,
it checks the addressing mode of i1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245137 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/AMDGPU/different-addrspace-addressing-mode-loops.ll [new file with mode: 0644]
test/Transforms/LoopStrengthReduce/AMDGPU/lit.local.cfg [new file with mode: 0644]
test/Transforms/LoopStrengthReduce/AMDGPU/lsr-postinc-pos-addrspace.ll [new file with mode: 0644]