[llvm] 4e8a02e - [Attributor][FIX] Remove assumption that doesn't have to hold

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 9 11:16:05 PST 2022


Author: Johannes Doerfert
Date: 2022-01-09T13:15:53-06:00
New Revision: 4e8a02e7f49dd6aa7f2a6003a2556fda639713c9

URL: https://github.com/llvm/llvm-project/commit/4e8a02e7f49dd6aa7f2a6003a2556fda639713c9
DIFF: https://github.com/llvm/llvm-project/commit/4e8a02e7f49dd6aa7f2a6003a2556fda639713c9.diff

LOG: [Attributor][FIX] Remove assumption that doesn't have to hold

There is no guarantee we strip all GEPOperators and the conservative
handling doesn't even require us to.

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index de7244ab27bde..07c16c7d6b707 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -7702,7 +7702,6 @@ void AAMemoryLocationImpl::categorizePtrValue(
   for (Value *Obj : Objects) {
     // TODO: recognize the TBAA used for constant accesses.
     MemoryLocationsKind MLK = NO_LOCATIONS;
-    assert(!isa<GEPOperator>(Obj) && "GEPs should have been stripped.");
     if (isa<UndefValue>(Obj))
       continue;
     if (isa<Argument>(Obj)) {


        


More information about the llvm-commits mailing list