[NFC] Remove redundant isFullSet checks
authorMax Kazantsev <mkazantsev@azul.com>
Mon, 12 Oct 2020 13:31:13 +0000 (20:31 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Mon, 12 Oct 2020 13:41:16 +0000 (20:41 +0700)
Full set case is handled inside intersection, no need to
litter the code with duplicating them outside.

llvm/lib/Analysis/ScalarEvolution.cpp

index 0cec210..036d806 100644 (file)
@@ -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);
       }
     }