OSDN Git Service

Minor code simplification.
authorDan Gohman <gohman@apple.com>
Mon, 12 Apr 2010 02:22:30 +0000 (02:22 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 12 Apr 2010 02:22:30 +0000 (02:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101009 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ConstantFolding.cpp

index dda1fba..37cda02 100644 (file)
@@ -401,7 +401,7 @@ static Constant *FoldReinterpretLoadFromConstPtr(Constant *C,
   APInt ResultVal = APInt(IntType->getBitWidth(), RawBytes[BytesLoaded-1]);
   for (unsigned i = 1; i != BytesLoaded; ++i) {
     ResultVal <<= 8;
-    ResultVal |= APInt(IntType->getBitWidth(), RawBytes[BytesLoaded-1-i]);
+    ResultVal |= RawBytes[BytesLoaded-1-i];
   }
 
   return ConstantInt::get(IntType->getContext(), ResultVal);