aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorRamkumar Ramachandra <ramkumar.ramachandra@codasip.com>2024-12-13 14:18:33 +0000
committerGitHub <noreply@github.com>2024-12-13 14:18:33 +0000
commit4a0d53a0b0a58a3c6980a7c551357ac71ba3db10 (patch)
treece56a6aab6c39c04d1f9b40cb2061c0f312e65cc /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
parent89f1f32bff76c8cf4545ada34663c6a758214cf0 (diff)
downloadllvm-4a0d53a0b0a58a3c6980a7c551357ac71ba3db10.zip
llvm-4a0d53a0b0a58a3c6980a7c551357ac71ba3db10.tar.gz
llvm-4a0d53a0b0a58a3c6980a7c551357ac71ba3db10.tar.bz2
PatternMatch: migrate to CmpPredicate (#118534)
With the introduction of CmpPredicate in 51a895a (IR: introduce struct with CmpInst::Predicate and samesign), PatternMatch is one of the first key pieces of infrastructure that must be updated to match a CmpInst respecting samesign information. Implement this change to Cmp-matchers. This is a preparatory step in migrating the codebase over to CmpPredicate. Since we no functional changes are desired at this stage, we have chosen not to migrate CmpPredicate::operator==(CmpPredicate) calls to use CmpPredicate::getMatching(), as that would have visible impact on tests that are not yet written: instead, we call CmpPredicate::operator==(Predicate), preserving the old behavior, while also inserting a few FIXME comments for follow-ups.
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
index 791d528..0bc752a 100644
--- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
@@ -1816,7 +1816,7 @@ bool SCEVExpander::hasRelatedExistingExpansion(const SCEV *S,
// Look for suitable value in simple conditions at the loop exits.
for (BasicBlock *BB : ExitingBlocks) {
- ICmpInst::Predicate Pred;
+ CmpPredicate Pred;
Instruction *LHS, *RHS;
if (!match(BB->getTerminator(),