R600/SI: Implement isLegalAddressingMode
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Aug 2014 17:17:07 +0000 (17:17 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Aug 2014 17:17:07 +0000 (17:17 +0000)
commited76ca720b71d02870d39e35404cbe3c00708edc
treeabeca593fb1c84bbe9ccdf07c7512f631f92bae3
parentd84561bf69132f7d1ab2775ef7f990fb5fb6905f
R600/SI: Implement isLegalAddressingMode

The default assumes that a 16-bit signed offset is used.
LDS instruction use a 16-bit unsigned offset, so it wasn't
being used in some cases where it was assumed a negative offset
could be used.

More should be done here, but first isLegalAddressingMode needs
to gain an addressing mode argument. For now, copy most of the rest
of the default implementation with the immediate offset change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215732 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/SIISelLowering.cpp
lib/Target/R600/SIISelLowering.h
test/CodeGen/R600/ds-negative-offset-addressing-mode-loop.ll [new file with mode: 0644]