ConstantFolding: Fix a crash when encoutering a truncating inttoptr.

This was introduced in r173293.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174424 91177308-0d34-0410-b5e6-96231b3b80d8
Hexagon: Use TFR_cond with cmpb.[eq,gt,gtu] to handle
         zext( set[ne,eq,gt,ugt] (...) ) type of dag patterns.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174429 91177308-0d34-0410-b5e6-96231b3b80d8
InstCombine: Harden code to work with vectors of pointers and simplify it a bit.

Found by running instcombine on a fabricated test case for the constant folder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174430 91177308-0d34-0410-b5e6-96231b3b80d8
Reapply r174343, with a fix for a scary DAG combine bug where it failed to differentiate between the alignment of the
base point of a load, and the overall alignment of the load.  This caused infinite loops in DAG combine with the
original application of this patch.

ORIGINAL COMMIT LOG:
When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment.  However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.

This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174431 91177308-0d34-0410-b5e6-96231b3b80d8
Removed explicit inline as per the LLVM style guide.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174432 91177308-0d34-0410-b5e6-96231b3b80d8
Added missing newline to end of test case.

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