[SROA] Fix a bug which could cause the common type finding to return
authorChandler Carruth <chandlerc@gmail.com>
Tue, 21 Jan 2014 23:16:05 +0000 (23:16 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 21 Jan 2014 23:16:05 +0000 (23:16 +0000)
commitc04f2c99aba75a5e05177c35360d16bee7da09b2
treeacc68e54f5c64688a42ccadc1a2b4f542dfafabc
parent3d218156f8eb62693c2ab31029859096a3b2e4a2
[SROA] Fix a bug which could cause the common type finding to return
inconsistent results for different orderings of alloca slices. The
fundamental issue is that it is just always a mistake to return early
from this function. There is no effective early exit to leverage. This
patch stops trynig to do so and simplifies the code a bit as
a consequence.

Original diagnosis and patch by James Molloy with some name tweaks by me
in part reflecting feedback from Duncan Smith on the mailing list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199771 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp