LICM: Do not loose alignment on promotion
authorTobias Grosser <grosser@fim.uni-passau.de>
Wed, 6 Jul 2011 19:19:55 +0000 (19:19 +0000)
committerTobias Grosser <grosser@fim.uni-passau.de>
Wed, 6 Jul 2011 19:19:55 +0000 (19:19 +0000)
commitdf7102b7d6d472c58d5f0fcc16e0ebf07c8deb55
treefdbb1a3e87376146da221b602aaf83d902a1fae5
parent29057766f741edc16d0faa70d4babec700b254e4
LICM: Do not loose alignment on promotion

The promotion code lost any alignment information, when hoisting loads and
stores out of the loop. This lead to incorrect aligned memory accesses. We now
use the largest alignment we can prove to be correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134520 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LICM.cpp
test/Transforms/LICM/2011-07-06-Alignment.ll [new file with mode: 0644]