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/LoopUtils.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/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 843364e..b172ef6 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -2032,6 +2032,7 @@ Value *llvm::addRuntimeChecks( MemoryRuntimeCheck = IsConflict; } + Exp.eraseDeadInstructions(MemoryRuntimeCheck); return MemoryRuntimeCheck; } @@ -2077,6 +2078,7 @@ Value *llvm::addDiffRuntimeChecks( MemoryRuntimeCheck = IsConflict; } + Expander.eraseDeadInstructions(MemoryRuntimeCheck); return MemoryRuntimeCheck; } |