From: Rafael Espindola Date: Fri, 14 Feb 2014 19:02:01 +0000 (+0000) Subject: Trivial cleanup: reuse existing variable. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=034b8f9d3184babb42d8ae2d9aae8620b30af2d9;p=oota-llvm.git Trivial cleanup: reuse existing variable. Extracted while trying to understand http://llvm-reviews.chandlerc.com/D1764. Patch by Matt Arsenault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201425 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp index bed53b832a9..114411e3f0c 100644 --- a/lib/Transforms/Scalar/SROA.cpp +++ b/lib/Transforms/Scalar/SROA.cpp @@ -2518,8 +2518,7 @@ private: } if (EmitMemCpy) { - Type *OtherPtrTy = IsDest ? II.getRawSource()->getType() - : II.getRawDest()->getType(); + Type *OtherPtrTy = OtherPtr->getType(); // Compute the other pointer, folding as much as possible to produce // a single, simple GEP in most cases.