diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2012-09-18 17:49:37 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2012-09-18 17:49:37 +0000 |
| commit | d356fd02a981a4a4ca1b5bb0cbbed7a9ede8aea3 (patch) | |
| tree | f1d6ab86f73c1df597a6f02ddc43ae00a862382c /llvm/lib | |
| parent | 282071efccba40a48a2612ddd8dc152209223014 (diff) | |
| download | bcm5719-llvm-d356fd02a981a4a4ca1b5bb0cbbed7a9ede8aea3.tar.gz bcm5719-llvm-d356fd02a981a4a4ca1b5bb0cbbed7a9ede8aea3.zip | |
Fix getCommonType in a different way from the way I fixed it when
working on FCA splitting. Instead of refusing to form a common type when
there are uses of a subsection of the alloca as well as a use of the
entire alloca, just skip the subsection uses and continue looking for
a whole-alloca use with a type that we can use.
This produces slightly prettier IR I think, and also fixes the other
failure in the test.
llvm-svn: 164146
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SROA.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index 3607d4cc8c6..c959560b188 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -1059,7 +1059,7 @@ Type *AllocaPartitioning::getCommonType(iterator I) const { if (isa<IntrinsicInst>(*UI->User)) continue; if (UI->BeginOffset != I->BeginOffset || UI->EndOffset != I->EndOffset) - return 0; + continue; Type *UserTy = 0; if (LoadInst *LI = dyn_cast<LoadInst>(&*UI->User)) { |

