From d7eda3ca1087978ed74225953436f75c2c220b77 Mon Sep 17 00:00:00 2001 From: Max Kazantsev Date: Tue, 7 Feb 2023 12:17:24 +0700 Subject: [PATCH] [SCEV][NFC] Remove check for rewriteable types I guess its only reason to exist is potential CT optimization, otherwise it is just creating cohesion between this code and rewriter internals. We plan to extend the rewriter. I'd rather not have this cohesion, unless there is a serious reason to have it. Differential Revision: https://reviews.llvm.org/D143246 --- llvm/lib/Analysis/ScalarEvolution.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index c3190bd..7234365 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -15041,10 +15041,6 @@ const SCEV *ScalarEvolution::applyLoopGuards(const SCEV *Expr, const Loop *L) { Predicate = CmpInst::getSwappedPredicate(Predicate); } - // Limit to expressions that can be rewritten. - if (!isa(LHS) && !isa(LHS)) - return; - // Check whether LHS has already been rewritten. In that case we want to // chain further rewrites onto the already rewritten value. auto I = RewriteMap.find(LHS); -- 2.7.4