diff options
author | Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com> | 2025-09-09 12:38:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-09 11:38:54 +0000 |
commit | 5544afd25368413fd663362cd4eb58811bf558d2 (patch) | |
tree | 31785b96eafdb20a3ebcb355919c616f037359bc /llvm/lib/Transforms/Utils/LoopVersioning.cpp | |
parent | 14f7e5fa06235dac1a2d82290aa4d69de9d56862 (diff) | |
download | llvm-5544afd25368413fd663362cd4eb58811bf558d2.zip llvm-5544afd25368413fd663362cd4eb58811bf558d2.tar.gz llvm-5544afd25368413fd663362cd4eb58811bf558d2.tar.bz2 |
[LoopUtils] Simplify expanded RT-checks (#157518)
Follow up on 528b13d ([SCEVExp] Add helper to clean up dead instructions
after expansion.) to hoist the SCEVExapnder::eraseDeadInstructions call
from LoopVectorize into the LoopUtils APIs add[Diff]RuntimeChecks, so
that other callers (LoopDistribute and LoopVersioning) can benefit from
the patch.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopVersioning.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp index 1711163..ec2e6c1 100644 --- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp +++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp @@ -81,6 +81,8 @@ void LoopVersioning::versionLoop( } else RuntimeCheck = MemRuntimeCheck ? MemRuntimeCheck : SCEVRuntimeCheck; + Exp.eraseDeadInstructions(SCEVRuntimeCheck); + assert(RuntimeCheck && "called even though we don't need " "any runtime checks"); |