From a124b4c7f9f8b06724284b86ba8bfc2137e8c21b Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Tue, 21 Mar 2023 19:04:14 -0700 Subject: [PATCH] [LFTR] Simplify another case under assumption exit counts are integers [nfc] This invariant was introduced in 8f3d16905d75b07a933d01dc29677fe5867c1b3e. --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 18c3fe06503b..5d6778ac7581 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -843,10 +843,6 @@ static PHINode *FindLoopCounter(Loop *L, BasicBlock *ExitingBB, if (!isLoopCounter(Phi, L, SE)) continue; - // Avoid comparing an integer IV against a pointer Limit. - if (BECount->getType()->isPointerTy() && !Phi->getType()->isPointerTy()) - continue; - const auto *AR = cast(SE->getSCEV(Phi)); // AR may be a pointer type, while BECount is an integer type.