[PATCH] D116210: [DSE][MemLoc] Handle intrinsics more generically
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 23 07:39:00 PST 2021
fhahn accepted this revision.
fhahn added a comment.
LGTM, thanks!
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:185
- if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
- switch (II->getIntrinsicID()) {
- default: llvm_unreachable("Does not have LocForWrite");
- case Intrinsic::lifetime_end:
- // Never remove dead lifetime_end's, e.g. because it is followed by a
- // free.
+ // Note: only get here for calls with analyzable writes.
+ if (auto *CB = dyn_cast<CallBase>(I)) {
----------------
might be worth an assert here
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116210/new/
https://reviews.llvm.org/D116210
More information about the llvm-commits
mailing list