summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GVN.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVN.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index a5de3d57e00..c48dd517a75 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -856,16 +856,6 @@ static int AnalyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr,
// a must alias. AA must have gotten confused.
// FIXME: Study to see if/when this happens. One case is forwarding a memset
// to a load from the base of the memset.
-#if 0
- if (LoadOffset == StoreOffset) {
- dbgs() << "STORE/LOAD DEP WITH COMMON POINTER MISSED:\n"
- << "Base = " << *StoreBase << "\n"
- << "Store Ptr = " << *WritePtr << "\n"
- << "Store Offs = " << StoreOffset << "\n"
- << "Load Ptr = " << *LoadPtr << "\n";
- abort();
- }
-#endif
// If the load and store don't overlap at all, the store doesn't provide
// anything to the load. In this case, they really don't alias at all, AA
@@ -884,17 +874,8 @@ static int AnalyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr,
else
isAAFailure = LoadOffset+int64_t(LoadSize) <= StoreOffset;
- if (isAAFailure) {
-#if 0
- dbgs() << "STORE LOAD DEP WITH COMMON BASE:\n"
- << "Base = " << *StoreBase << "\n"
- << "Store Ptr = " << *WritePtr << "\n"
- << "Store Offs = " << StoreOffset << "\n"
- << "Load Ptr = " << *LoadPtr << "\n";
- abort();
-#endif
+ if (isAAFailure)
return -1;
- }
// If the Load isn't completely contained within the stored bits, we don't
// have all the bits to feed it. We could do something crazy in the future
OpenPOWER on IntegriCloud