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)
commitd9f7910671958cf9f3ef727ceec2076abb4c6023
tree55924c4e81146ca65e659c77870014139ecd456e
parent7b104007096a7abbb760f3ab520fbd2bef7980c4
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!

llvm-svn: 164641
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/basictest.ll