From 64cd985e447124670715227763674631333e00b7 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 18 Oct 2016 21:00:26 +0000 Subject: [PATCH] [GVN] Remove dead code. NFC. llvm-svn: 284534 --- llvm/lib/Transforms/Scalar/GVN.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index a5de3d5..c48dd51 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 -- 2.7.4