[GVNHoist] Properly merge alignments when hoisting
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 25 Jul 2016 02:21:23 +0000 (02:21 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 25 Jul 2016 02:21:23 +0000 (02:21 +0000)
commit4728569d0a8c255f9727409879bbd290c0953d83
tree00426f85a46c0c50875e91ced247634e4b3f8ba1
parent6f014d37d5c57e42d55dc95fcd992561439e4aad
[GVNHoist] Properly merge alignments when hoisting

If we two loads of two different alignments, we must use the minimum of
the two alignments when hoisting.  Same deal for stores.

For allocas, use the maximum of the two allocas.

llvm-svn: 276601
llvm/lib/Transforms/Scalar/GVNHoist.cpp
llvm/test/Transforms/GVN/hoist.ll