diff options
| author | Florian Hahn <flo@fhahn.com> | 2025-10-13 20:28:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-13 19:28:53 +0000 |
| commit | 7f04ee19d21d28f7a533fff98c69c16863e6984a (patch) | |
| tree | af927b95e001e73cfd71b30aa04ea2f8151dda29 /llvm/lib/Transforms | |
| parent | e10e2f7288c88ef31ef9ca2a1eb0eaba610080e0 (diff) | |
| download | llvm-7f04ee19d21d28f7a533fff98c69c16863e6984a.zip llvm-7f04ee19d21d28f7a533fff98c69c16863e6984a.tar.gz llvm-7f04ee19d21d28f7a533fff98c69c16863e6984a.tar.bz2 | |
[SCEV] Move URem matching to ScalarEvolutionPatternMatch.h (#163170)
Move URem matching to ScalarEvolutionPatternMatch.h so it can
be re-used together with other matchers.
Depends on https://github.com/llvm/llvm-project/pull/163169
PR: https://github.com/llvm/llvm-project/pull/163170
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index 45cee1e..9035e58 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -526,7 +526,7 @@ Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { // Recognize the canonical representation of an unsimplifed urem. const SCEV *URemLHS = nullptr; const SCEV *URemRHS = nullptr; - if (SE.matchURem(S, URemLHS, URemRHS)) { + if (match(S, m_scev_URem(m_SCEV(URemLHS), m_SCEV(URemRHS), SE))) { Value *LHS = expand(URemLHS); Value *RHS = expand(URemRHS); return InsertBinop(Instruction::URem, LHS, RHS, SCEV::FlagAnyWrap, |
