Use existing builtin hashing functions to make this routine more
simple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187745 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Use existing builtin hashing functions to make this routine more"

This reverts commit r187745.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187747 91177308-0d34-0410-b5e6-96231b3b80d8
TargetLowering: Add getVectorIdxTy() function v2

This virtual function can be implemented by targets to specify the type
to use for the index operand of INSERT_VECTOR_ELT, EXTRACT_VECTOR_ELT,
INSERT_SUBVECTOR, EXTRACT_SUBVECTOR.  The default implementation returns
the result from TargetLowering::getPointerTy()

The previous code was using TargetLowering::getPointerTy() for vector
indices, because this is guaranteed to be legal on all targets.  However,
using TargetLowering::getPointerTy() can be a problem for targets with
pointer sizes that differ across address spaces.  On such targets,
when vectors need to be loaded or stored to an address space other than the
default 'zero' address space (which is the address space assumed by
TargetLowering::getPointerTy()), having an index that
is a different size than the pointer can lead to inefficient
pointer calculations, (e.g. 64-bit adds for a 32-bit address space).

There is no intended functionality change with this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187748 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Implement TargetLowering::getVectorIdxTy()

We use MVT::i32 for the vector index type, because we use 32-bit
operations to caculate offsets when dynamically indexing vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187749 91177308-0d34-0410-b5e6-96231b3b80d8
Recommit previous cleanup with a fix for c++98 ambiguity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187752 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Add missing test for r187749

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187754 91177308-0d34-0410-b5e6-96231b3b80d8
Fix grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187755 91177308-0d34-0410-b5e6-96231b3b80d8
FileCheckize some of the testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187756 91177308-0d34-0410-b5e6-96231b3b80d8