From: Duncan Sands Date: Fri, 2 Nov 2012 07:49:32 +0000 (+0000) Subject: Fix an obvious typo that causes an assertion failure when running X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d295c9729d04727666c84c4a184e8ce796dd9974;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167285 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index f10b71d33e0..f003e066996 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -780,7 +780,7 @@ static Value *CoerceAvailableValueToLoadType(Value *StoredVal, Type *TypeToCastTo = LoadedTy; if (TypeToCastTo->getScalarType()->isPointerTy()) - TypeToCastTo = TD.getIntPtrType(StoredValTy); + TypeToCastTo = TD.getIntPtrType(TypeToCastTo); if (StoredValTy != TypeToCastTo) StoredVal = new BitCastInst(StoredVal, TypeToCastTo, "", InsertPt);