diff options
| author | Florian Hahn <flo@fhahn.com> | 2023-07-05 18:11:39 +0100 |
|---|---|---|
| committer | Florian Hahn <flo@fhahn.com> | 2023-07-05 18:11:44 +0100 |
| commit | 69ca5c9d62deef66a00ceb26706fab7c755d1f10 (patch) | |
| tree | 4942fb2e1d85c525da29abdd0bfedf55b0946698 /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | |
| parent | 68f5d1be3d8f9b2ee2f25098203b24a32057b4e6 (diff) | |
| download | llvm-69ca5c9d62deef66a00ceb26706fab7c755d1f10.zip llvm-69ca5c9d62deef66a00ceb26706fab7c755d1f10.tar.gz llvm-69ca5c9d62deef66a00ceb26706fab7c755d1f10.tar.bz2 | |
[SCEV] Add flag to control invertible check for normalization.
When normalizing a SCEV expression during expansion, there should be
no need for it to be invertible, as it will only be used for code
generation. This fixes a crash after 7f5b15ad150e.
Fixes https://github.com/llvm/llvm-project/issues/63678.
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index ab6cb29..6200b4d 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -1392,7 +1392,8 @@ Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) { if (PostIncLoops.count(L)) { PostIncLoopSet Loops; Loops.insert(L); - Normalized = cast<SCEVAddRecExpr>(normalizeForPostIncUse(S, Loops, SE)); + Normalized = cast<SCEVAddRecExpr>( + normalizeForPostIncUse(S, Loops, SE, /*CheckInvertible=*/false)); } // Strip off any non-loop-dominating component from the addrec start. |
