[llvm] 28237c3 - [NFC] Remove redundant isFullSet checks
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 06:41:33 PDT 2020
Author: Max Kazantsev
Date: 2020-10-12T20:41:16+07:00
New Revision: 28237c33d99042de10417ba3de38d53634317ebd
URL: https://github.com/llvm/llvm-project/commit/28237c33d99042de10417ba3de38d53634317ebd
DIFF: https://github.com/llvm/llvm-project/commit/28237c33d99042de10417ba3de38d53634317ebd.diff
LOG: [NFC] Remove redundant isFullSet checks
Full set case is handled inside intersection, no need to
litter the code with duplicating them outside.
Added:
Modified:
llvm/lib/Analysis/ScalarEvolution.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 0cec21089204..036d80649110 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -5500,16 +5500,14 @@ ScalarEvolution::getRangeRef(const SCEV *S,
auto RangeFromAffine = getRangeForAffineAR(
AddRec->getStart(), AddRec->getStepRecurrence(*this), MaxBECount,
BitWidth);
- if (!RangeFromAffine.isFullSet())
- ConservativeResult =
- ConservativeResult.intersectWith(RangeFromAffine, RangeType);
+ ConservativeResult =
+ ConservativeResult.intersectWith(RangeFromAffine, RangeType);
auto RangeFromFactoring = getRangeViaFactoring(
AddRec->getStart(), AddRec->getStepRecurrence(*this), MaxBECount,
BitWidth);
- if (!RangeFromFactoring.isFullSet())
- ConservativeResult =
- ConservativeResult.intersectWith(RangeFromFactoring, RangeType);
+ ConservativeResult =
+ ConservativeResult.intersectWith(RangeFromFactoring, RangeType);
}
}
More information about the llvm-commits
mailing list