From: Fangrui Song Date: Sun, 10 Feb 2019 09:25:56 +0000 (+0000) Subject: [Local] Delete a redundant check. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f51464f160cdb2ec0dd9263c1646b5a428664e8;p=llvm [Local] Delete a redundant check. NFC isInstructionTriviallyDead also performs the use_empty() check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353637 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 062bbcdae2c..933a69caaaa 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -429,7 +429,7 @@ bool llvm::wouldInstructionBeTriviallyDead(Instruction *I, bool llvm::RecursivelyDeleteTriviallyDeadInstructions( Value *V, const TargetLibraryInfo *TLI, MemorySSAUpdater *MSSAU) { Instruction *I = dyn_cast(V); - if (!I || !I->use_empty() || !isInstructionTriviallyDead(I, TLI)) + if (!I || !isInstructionTriviallyDead(I, TLI)) return false; SmallVector DeadInsts;