[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)
commit5cbc7d2999bea6a005e02ec2a8ec4ae53c9646a5
tree24622c29eae7603d96a8feb6b580be7d150b1d9f
parent4cc10d432a0b38e4ec5292b39925f95ebcde2801
[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.

llvm-svn: 244166
llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
llvm/test/CodeGen/NVPTX/load-with-non-coherent-cache.ll