[PATCH] D148113: [IRCE][NFC] Remove unused variable IsSigned
Aleksandr Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 04:16:48 PDT 2023
aleksandr.popov created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
aleksandr.popov requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
https://reviews.llvm.org/D148113
Files:
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
Index: llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -145,8 +145,7 @@
Use *CheckUse = nullptr;
static bool parseRangeCheckICmp(Loop *L, ICmpInst *ICI, ScalarEvolution &SE,
- Value *&Index, Value *&Length,
- bool &IsSigned);
+ Value *&Index, Value *&Length);
static void
extractRangeChecksFromCond(Loop *L, ScalarEvolution &SE, Use &ConditionUse,
@@ -291,7 +290,7 @@
bool
InductiveRangeCheck::parseRangeCheckICmp(Loop *L, ICmpInst *ICI,
ScalarEvolution &SE, Value *&Index,
- Value *&Length, bool &IsSigned) {
+ Value *&Length) {
auto IsLoopInvariant = [&SE, L](Value *V) {
return SE.isLoopInvariant(SE.getSCEV(V), L);
};
@@ -308,7 +307,6 @@
std::swap(LHS, RHS);
[[fallthrough]];
case ICmpInst::ICMP_SGE:
- IsSigned = true;
if (match(RHS, m_ConstantInt<0>())) {
Index = LHS;
return true; // Lower.
@@ -319,7 +317,6 @@
std::swap(LHS, RHS);
[[fallthrough]];
case ICmpInst::ICMP_SGT:
- IsSigned = true;
if (match(RHS, m_ConstantInt<-1>())) {
Index = LHS;
return true; // Lower.
@@ -336,7 +333,6 @@
std::swap(LHS, RHS);
[[fallthrough]];
case ICmpInst::ICMP_UGT:
- IsSigned = false;
if (IsLoopInvariant(LHS)) {
Index = RHS;
Length = LHS;
@@ -370,8 +366,7 @@
return;
Value *Length = nullptr, *Index;
- bool IsSigned;
- if (!parseRangeCheckICmp(L, ICI, SE, Index, Length, IsSigned))
+ if (!parseRangeCheckICmp(L, ICI, SE, Index, Length))
return;
const auto *IndexAddRec = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(Index));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148113.512771.patch
Type: text/x-patch
Size: 2005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230412/413f2e10/attachment.bin>
More information about the llvm-commits
mailing list