[llvm-commits] [llvm] r101009 - /llvm/trunk/lib/Analysis/ConstantFolding.cpp
Dan Gohman
gohman at apple.com
Sun Apr 11 19:22:30 PDT 2010
Author: djg
Date: Sun Apr 11 21:22:30 2010
New Revision: 101009
URL: http://llvm.org/viewvc/llvm-project?rev=101009&view=rev
Log:
Minor code simplification.
Modified:
llvm/trunk/lib/Analysis/ConstantFolding.cpp
Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=101009&r1=101008&r2=101009&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original)
+++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Sun Apr 11 21:22:30 2010
@@ -401,7 +401,7 @@
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);
More information about the llvm-commits
mailing list