Add tests for bug 18228
Simple fix for bug 18228
Refactor castIsValid
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.
Fix spacing
Add braces
Spacing around operators
Irrelevant formatting change
Check address space in isCastable because why not
Add tests that will hit CreatePointerCast assertion in one place
Teach InlineCost about address spaces
XXX - Use helper in datalayout
Add getMaxPtrSizeIntTy
Add a function to get the largest address space pointer size

Some users of DataLayout::getPointerSize don't use it in an exact way,
and aren't really using it for the pointer size. For example
MemCpyOptimizer uses it as a guess for the maximum GPR width.
Teach lint about address spaces
Fix lint with address spaces
Remove default address space argument
Don't use default address space arguments in GlobalOpt
Convert test to FileCheck
Add inconsequential address space stuff