Don't drop the alignment on a memcpy intrinsic when producing a store. This is
authorNick Lewycky <nicholas@mxc.ca>
Tue, 25 Sep 2012 22:46:21 +0000 (22:46 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Tue, 25 Sep 2012 22:46:21 +0000 (22:46 +0000)
commit051a318e67ae601c46b4fc7ceb5c5b0b605a296d
tree059ad472fc8b4edee48adf0dd4cea534eb43b547
parent289b5d7f02a442cb849d3762a78796d3355b02fc
Don't drop the alignment on a memcpy intrinsic when producing a store. This is
only a missed optimization opportunity if the store is over-aligned, but a
miscompile if the store's new type has a higher natural alignment than the
memcpy did. Fixes PR13920!

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