Corruptly merge constants with explicit and implicit alignments.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 12 Nov 2013 20:21:43 +0000 (20:21 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 12 Nov 2013 20:21:43 +0000 (20:21 +0000)
commit46456f6a2ff5b81a3ea60bdcf9a0813c9fa4257f
tree870f4b4193c22e91305610d26ee649440b329eed
parent72c84a8294a061208d2dc76caf282d83b0f84549
Corruptly merge constants with explicit and implicit alignments.

Constant merge can merge a constant with implicit alignment with one that has
explicit alignment. Before this change it was assuming that the explicit
alignment was higher than the implicit one, causing the result to be under
aligned in some cases.

Fixes pr17815.

Patch by Chris Smowton!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194506 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/ConstantMerge.cpp
test/Transforms/ConstantMerge/align.ll [new file with mode: 0644]