[SROA] Remove incorrect assertion
authorJames Molloy <james.molloy@arm.com>
Mon, 22 Aug 2016 18:49:42 +0000 (18:49 +0000)
committerJames Molloy <james.molloy@arm.com>
Mon, 22 Aug 2016 18:49:42 +0000 (18:49 +0000)
Confirmed with aprantl, this assertion is incorrect - code can get here (for example 80-bit FP types) and if it does it's benign. This is exposed by a completely unrelated patch of mine, so stop the compiler falling over.

Original differential: http://reviews.llvm.org/D16187
aprantl's advice to remove assertion: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html

llvm-svn: 279454

llvm/lib/Transforms/Scalar/SROA.cpp

index 874f4e7..123c176 100644 (file)
@@ -4037,9 +4037,6 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
           Size = std::min(Size, AbsEnd - Start);
         }
         PieceExpr = DIB.createBitPieceExpression(Start, Size);
-      } else {
-        assert(Pieces.size() == 1 &&
-               "partition is as large as original alloca");
       }
 
       // Remove any existing dbg.declare intrinsic describing the same alloca.