[llvm-commits] [llvm] r167285 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Duncan Sands
baldrick at free.fr
Fri Nov 2 00:49:32 PDT 2012
Author: baldrick
Date: Fri Nov 2 02:49:32 2012
New Revision: 167285
URL: http://llvm.org/viewvc/llvm-project?rev=167285&view=rev
Log:
Fix an obvious typo that causes an assertion failure when running
test/Transforms/GVN/rle.ll if the (currently disabled) check for a
pointer type in getIntPtrType is turned on.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=167285&r1=167284&r2=167285&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Fri Nov 2 02:49:32 2012
@@ -780,7 +780,7 @@
Type *TypeToCastTo = LoadedTy;
if (TypeToCastTo->getScalarType()->isPointerTy())
- TypeToCastTo = TD.getIntPtrType(StoredValTy);
+ TypeToCastTo = TD.getIntPtrType(TypeToCastTo);
if (StoredValTy != TypeToCastTo)
StoredVal = new BitCastInst(StoredVal, TypeToCastTo, "", InsertPt);
More information about the llvm-commits
mailing list