From: Chandler Carruth Date: Fri, 14 Sep 2012 10:30:44 +0000 (+0000) Subject: Rely on the recursive check for pointer types rather than adding an X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=01f85f02a426617e095143f1ac2c19c2e59ee76d;p=oota-llvm.git Rely on the recursive check for pointer types rather than adding an explicit check before recursing. A simplification requested by Duncan during review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163896 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp index 27808ea8c8b..a0fcf212313 100644 --- a/lib/Transforms/Scalar/SROA.cpp +++ b/lib/Transforms/Scalar/SROA.cpp @@ -2368,9 +2368,6 @@ static Type *getTypePartition(const TargetData &TD, Type *Ty, if (Offset > 0 || Size < ElementSize) { if ((Offset + Size) > ElementSize) return 0; - // Bail if this is a poniter element, we can't recurse through them. - if (ElementTy->isPointerTy()) - return 0; return getTypePartition(TD, ElementTy, Offset, Size); } assert(Offset == 0);