[SROA] Split the alignment computation complete for the memcpy rewriting
authorChandler Carruth <chandlerc@gmail.com>
Wed, 26 Feb 2014 07:29:54 +0000 (07:29 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 26 Feb 2014 07:29:54 +0000 (07:29 +0000)
commit38e90e3de1c05ccfd469275c08d403f638cdcce1
tree0ef075fbd574d60739729221174accf8d4153d23
parent07f95b3218e6590ac3476200147f8ce3ffafed93
[SROA] Split the alignment computation complete for the memcpy rewriting
to work independently for the slice side and the other side.

This allows us to only compute the minimum of the two when we actually
rewrite to a memcpy that needs to take the minimum, and preserve higher
alignment for one side or the other when rewriting to loads and stores.

This fix was inspired by seeing the result of some refactoring that
makes addrspace handling better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202242 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp
test/Transforms/SROA/basictest.ll