[llvm-commits] [llvm] r122604 - /llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Chris Lattner
sabre at nondot.org
Tue Dec 28 10:53:48 PST 2010
Author: lattner
Date: Tue Dec 28 12:53:48 2010
New Revision: 122604
URL: http://llvm.org/viewvc/llvm-project?rev=122604&view=rev
Log:
simplify this, isBytewiseValue handles the extra check. We still
check for "multiple of a byte" in size to make it clear that the
>> 3 below is safe.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp?rev=122604&r1=122603&r2=122604&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp Tue Dec 28 12:53:48 2010
@@ -164,12 +164,9 @@
Value *StoredVal = SI->getValueOperand();
Value *StorePtr = SI->getPointerOperand();
- // Check to see if the store updates all bits in memory. We don't want to
- // process things like a store of i3. We also require that the store be a
- // multiple of a byte.
+ // Reject stores that are so large that they overflow an unsigned.
uint64_t SizeInBits = TD->getTypeSizeInBits(StoredVal->getType());
- if ((SizeInBits & 7) || (SizeInBits >> 32) != 0 ||
- SizeInBits != TD->getTypeStoreSizeInBits(StoredVal->getType()))
+ if ((SizeInBits & 7) || (SizeInBits >> 32) != 0)
return false;
// See if the pointer expression is an AddRec like {base,+,1} on the current
More information about the llvm-commits
mailing list