aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2025-02-04 02:18:33 +0800
committerGitHub <noreply@github.com>2025-02-04 02:18:33 +0800
commit9fbd5fbcc60aca3f9b093727e91da73798591c4a (patch)
tree0e27b3c2bca4de692d8a27a84c8fd6f409336f74 /llvm/lib/Transforms/Utils/Local.cpp
parentfe694b18dc518b86eae9aab85ff03abc54e1662f (diff)
downloadllvm-9fbd5fbcc60aca3f9b093727e91da73798591c4a.zip
llvm-9fbd5fbcc60aca3f9b093727e91da73798591c4a.tar.gz
llvm-9fbd5fbcc60aca3f9b093727e91da73798591c4a.tar.bz2
[IR][NFC] Switch to use `LifetimeIntrinsic` (#125528)
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index d5cf62e..2c63283 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -497,10 +497,7 @@ bool llvm::wouldInstructionBeTriviallyDead(const Instruction *I,
// are lifetime intrinsics then the intrinsics are dead.
if (isa<AllocaInst>(Arg) || isa<GlobalValue>(Arg) || isa<Argument>(Arg))
return llvm::all_of(Arg->uses(), [](Use &Use) {
- if (IntrinsicInst *IntrinsicUse =
- dyn_cast<IntrinsicInst>(Use.getUser()))
- return IntrinsicUse->isLifetimeStartOrEnd();
- return false;
+ return isa<LifetimeIntrinsic>(Use.getUser());
});
return false;
}