[PATCH] D22873: [DSE] Fix bug in updating MadeChange flag
Jun Bum Lim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 09:51:14 PDT 2016
junbuml created this revision.
junbuml added a reviewer: mcrosier.
junbuml added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.
The MadeChange flag should be ORed to keep the previous result.
https://reviews.llvm.org/D22873
Files:
lib/Transforms/Scalar/DeadStoreElimination.cpp
Index: lib/Transforms/Scalar/DeadStoreElimination.cpp
===================================================================
--- lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -933,7 +933,7 @@
int64_t EarlierSize = int64_t(Loc.Size);
GetPointerBaseWithConstantOffset(Ptr, EarlierStart, DL);
OverlapIntervalsTy &IntervalMap = OI.second;
- Changed =
+ Changed |=
tryToShortenEnd(EarlierWrite, IntervalMap, EarlierStart, EarlierSize);
if (IntervalMap.empty())
continue;
@@ -1079,7 +1079,7 @@
int64_t EarlierSize = DepLoc.Size;
int64_t LaterSize = Loc.Size;
bool IsOverwriteEnd = (OR == OverwriteEnd);
- MadeChange = tryToShorten(DepWrite, DepWriteOffset, EarlierSize,
+ MadeChange |= tryToShorten(DepWrite, DepWriteOffset, EarlierSize,
InstWriteOffset, LaterSize, IsOverwriteEnd);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22873.65759.patch
Type: text/x-patch
Size: 979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160727/8775c880/attachment.bin>
More information about the llvm-commits
mailing list