[llvm] r201425 - Trivial cleanup: reuse existing variable.

Rafael Espindola rafael.espindola at gmail.com
Fri Feb 14 11:02:01 PST 2014


Author: rafael
Date: Fri Feb 14 13:02:01 2014
New Revision: 201425

URL: http://llvm.org/viewvc/llvm-project?rev=201425&view=rev
Log:
Trivial cleanup: reuse existing variable.

Extracted while trying to understand http://llvm-reviews.chandlerc.com/D1764.

Patch by Matt Arsenault.

Modified:
    llvm/trunk/lib/Transforms/Scalar/SROA.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=201425&r1=201424&r2=201425&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Fri Feb 14 13:02:01 2014
@@ -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.





More information about the llvm-commits mailing list