[NVPTX] Use LDG for pointer induction variables.
authorBjarke Hammersholt Roune <broune@google.com>
Wed, 5 Aug 2015 23:11:57 +0000 (23:11 +0000)
committerBjarke Hammersholt Roune <broune@google.com>
Wed, 5 Aug 2015 23:11:57 +0000 (23:11 +0000)
commitb6d966836502fe3ba702e27ea1cc23ca9c082f5a
tree9075a62df65a16e27cd0f43ba646965d0ec3b4d3
parent5707219e9494f14a01ad0ddf0e55a91af1723f7a
[NVPTX] Use LDG for pointer induction variables.

More specifically, make NVPTXISelDAGToDAG able to emit cached loads (LDG) for pointer induction variables.

Also fix latent bug where LDG was not restricted to kernel functions. I believe that this could not be triggered so far since we do not currently infer that a pointer is global outside a kernel function, and only loads of global pointers are considered for cached loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244166 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
test/CodeGen/NVPTX/load-with-non-coherent-cache.ll