[bugpoint] Allow the user to specify the path to opt on the commandline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187739 91177308-0d34-0410-b5e6-96231b3b80d8
Change parent hashing algorithm to be non-recursive and elaborate
greatly on many comments in the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187742 91177308-0d34-0410-b5e6-96231b3b80d8
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
Fix missing -*- C++ -*-s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187758 91177308-0d34-0410-b5e6-96231b3b80d8
Fix assertion failure when ptrtoint int size is larger

When the int was larger than the pointer size, the saved constant
offset would be the wrong type at the uses, resulting in this failure.

In the added test case for example, the sub i64 ended up with
i32 operands, which would then fail on its use in the icmp.
Run load-icmp with datalayout. There are paths not tested now it is supposed to test
Add more instcombine tests
Remove seemingly dead InstCombine compare code

Add some more tests to try to break it. These paths weren't tested
with a datalayout. This checks if it needs to cast GEP indices,
but at this point they should have already been converted to the
pointer sized integer.