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
This commit is contained in:
Duncan Sands 2012-11-02 07:49:32 +00:00
parent 6e48f03077
commit d295c9729d

View File

@ -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);