[SROA] Function canConvertValue needs to check whether both NewTy and OldTy pointers are
authorJack Liu <jack.liu@intel.com>
Tue, 3 May 2016 19:30:48 +0000 (19:30 +0000)
committerJack Liu <jack.liu@intel.com>
Tue, 3 May 2016 19:30:48 +0000 (19:30 +0000)
commitf101c0f7a1eb7e8e47ffc79dc440ea34fa11fbc3
treed079e909745803964ccfc1228e61930d6518f28e
parent34fd4fb459a1b396646b698247a191c7056a1202
[SROA] Function canConvertValue needs to check whether both NewTy and OldTy pointers are
pointing to the same addr space. This can prevent SROA from creating a bitcast
between pointers with different addr spaces.

Differential Revision: http://reviews.llvm.org/D19697

llvm-svn: 268424
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/address-spaces.ll