From c8c93fdf0a06ef37705a0908e20e9c2c7103fce4 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 1 Mar 2021 17:16:08 -0600 Subject: [PATCH] [Attributor] Avoid work for GEPs and wait till the users are visited --- llvm/lib/Transforms/IPO/AttributorAttributes.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index 54b5b5887d35..5a6d93a80c9d 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -3690,10 +3690,9 @@ static unsigned getKnownAlignForUse(Attributor &A, AAAlign &QueryingAA, return 0; } if (auto *GEP = dyn_cast(I)) { - if (GEP->hasAllConstantIndices()) { + if (GEP->hasAllConstantIndices()) TrackUse = true; - return 0; - } + return 0; } MaybeAlign MA;