diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 5 |
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; } |