OSDN Git Service

Merging r341094:
authorHans Wennborg <hans@hanshq.net>
Fri, 31 Aug 2018 15:53:05 +0000 (15:53 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 31 Aug 2018 15:53:05 +0000 (15:53 +0000)
commit8be5c4fc9a8f2bb3f77d5175e021fcc350d6236a
tree9c90d5f14a286487f4f218cd0abf63612b68b917
parent485d2110bdd3de0d65aa932fe98a6b5f910a9c03
Merging r341094:
------------------------------------------------------------------------
r341094 | efriedma | 2018-08-30 20:59:24 +0200 (Thu, 30 Aug 2018) | 11 lines

[SROA] Fix alignment for uses of PHI nodes.

Splitting an alloca can decrease the alignment of GEPs into the
partition.  Normally, rewriting accounts for this, but the code was
missing for uses of PHI nodes and select instructions.

Fixes https://bugs.llvm.org/show_bug.cgi?id=38707 .

Differential Revision: https://reviews.llvm.org/D51335

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@341220 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp
test/Transforms/SROA/phi-and-select.ll