[Attributor] Avoid work for GEPs and wait till the users are visited
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 1 Mar 2021 23:16:08 +0000 (17:16 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 4 Mar 2021 06:35:52 +0000 (00:35 -0600)
llvm/lib/Transforms/IPO/AttributorAttributes.cpp

index 54b5b58..5a6d93a 100644 (file)
@@ -3690,10 +3690,9 @@ static unsigned getKnownAlignForUse(Attributor &A, AAAlign &QueryingAA,
     return 0;
   }
   if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
-    if (GEP->hasAllConstantIndices()) {
+    if (GEP->hasAllConstantIndices())
       TrackUse = true;
-      return 0;
-    }
+    return 0;
   }
 
   MaybeAlign MA;