[llvm] 246f8d4 - [NFC][IRCE] Remove meaningless local variable

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 23:05:10 PDT 2023


Author: Max Kazantsev
Date: 2023-04-13T13:04:45+07:00
New Revision: 246f8d4be521924ce94755a712cc473ee4e68e14

URL: https://github.com/llvm/llvm-project/commit/246f8d4be521924ce94755a712cc473ee4e68e14
DIFF: https://github.com/llvm/llvm-project/commit/246f8d4be521924ce94755a712cc473ee4e68e14.diff

LOG: [NFC][IRCE] Remove meaningless local variable

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
index 0241b4002b60..7be124b2b98a 100644
--- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -1054,14 +1054,11 @@ static const SCEV *NoopOrExtend(const SCEV *S, Type *Ty, ScalarEvolution &SE,
 
 std::optional<LoopConstrainer::SubRanges>
 LoopConstrainer::calculateSubRanges(bool IsSignedPredicate) const {
-  const IntegerType *Ty = ExitCountTy;
-
   auto *RTy = cast<IntegerType>(Range.getType());
-
   // We only support wide range checks and narrow latches.
-  if (!AllowNarrowLatchCondition && RTy != Ty)
+  if (!AllowNarrowLatchCondition && RTy != ExitCountTy)
     return std::nullopt;
-  if (RTy->getBitWidth() < Ty->getBitWidth())
+  if (RTy->getBitWidth() < ExitCountTy->getBitWidth())
     return std::nullopt;
 
   LoopConstrainer::SubRanges Result;


        


More information about the llvm-commits mailing list