Creating release candidate rc3 from release_360 branch

llvm-svn: 229050
llvm-svn: 229049
llvm-svn: 229048
llvm-svn: 229047
llvm-svn: 229046
llvm-svn: 229045
llvm-svn: 229044
llvm-svn: 229043
llvm-svn: 229040
llvm-svn: 229039
Merging r229029, minus the test which didn't work on the branch:

------------------------------------------------------------------------
r229029 | chandlerc | 2015-02-12 18:30:01 -0800 (Thu, 12 Feb 2015) | 16 lines

[IC] Fix a bug with the instcombine canonicalizing of loads and
propagating of metadata.

We were propagating !nonnull metadata even when the newly formed load is
no longer of a pointer type. This is clearly broken and results in LLVM
failing the verifier and aborting. This patch just restricts the
propagation of !nonnull metadata to when we actually have a pointer
type.

This bug report and the initial version of this patch was provided by
Charles Davis! Many thanks for finding this!

We still need to add logic to round-trip the metadata correctly if we
combine from pointer types to integer types and then back by using range
metadata for the integer type loads. But this is the minimal and safe
version of the patch, which is important so we can backport it into 3.6.
------------------------------------------------------------------------

llvm-svn: 229036
2 files changed