From 0cc59250d5bd394d9f48802526e9f619aae3be72 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 14 Sep 2012 10:30:44 +0000 Subject: Rely on the recursive check for pointer types rather than adding an explicit check before recursing. A simplification requested by Duncan during review. llvm-svn: 163896 --- llvm/lib/Transforms/Scalar/SROA.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/SROA.cpp') diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index 27808ea8c8b..a0fcf212313 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/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); -- cgit v1.2.3