From 1fe6bfca593404e261922990f230326934dda4d6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 22 Mar 2012 03:46:58 +0000 Subject: [PATCH] don't use "signed", just something I noticed in patches flying by. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153237 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/ScalarReplAggregates.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index d36a18f21c6..4e348687777 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -574,8 +574,8 @@ void ConvertToScalarInfo::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, // transform it into a store of the expanded constant value. if (MemSetInst *MSI = dyn_cast(User)) { assert(MSI->getRawDest() == Ptr && "Consistency error!"); - signed SNumBytes = cast(MSI->getLength())->getSExtValue(); - if (SNumBytes > 0) { + int64_t SNumBytes = cast(MSI->getLength())->getSExtValue(); + if (SNumBytes > 0 && (SNumBytes >> 32) == 0) { unsigned NumBytes = static_cast(SNumBytes); unsigned Val = cast(MSI->getValue())->getZExtValue();