diff options
author | Chris Lattner <sabre@nondot.org> | 2010-12-28 18:53:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-12-28 18:53:48 +0000 |
commit | 95ae676bc89b4cb9166576b74f1220ab5b0ff0ad (patch) | |
tree | 2f562a59033548cd3fff137f1a77cea00d0b7ad3 | |
parent | 1dc5db2bebef06a94244bcd8e4415b85766c07a7 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122604 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index 7565b70582..2b6723f0ca 100644 --- a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -164,12 +164,9 @@ bool LoopIdiomRecognize::processLoopStore(StoreInst *SI, const SCEV *BECount) { 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 |