]> granicus.if.org Git - llvm/commitdiff
[Local] Delete a redundant check. NFC
authorFangrui Song <maskray@google.com>
Sun, 10 Feb 2019 09:25:56 +0000 (09:25 +0000)
committerFangrui Song <maskray@google.com>
Sun, 10 Feb 2019 09:25:56 +0000 (09:25 +0000)
isInstructionTriviallyDead also performs the use_empty() check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353637 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/Local.cpp

index 062bbcdae2ca4b3f001b29f32e32fafecd7f545a..933a69caaaa3e36023cfbf4e5a18902f0273da76 100644 (file)
@@ -429,7 +429,7 @@ bool llvm::wouldInstructionBeTriviallyDead(Instruction *I,
 bool llvm::RecursivelyDeleteTriviallyDeadInstructions(
     Value *V, const TargetLibraryInfo *TLI, MemorySSAUpdater *MSSAU) {
   Instruction *I = dyn_cast<Instruction>(V);
-  if (!I || !I->use_empty() || !isInstructionTriviallyDead(I, TLI))
+  if (!I || !isInstructionTriviallyDead(I, TLI))
     return false;
 
   SmallVector<Instruction*, 16> DeadInsts;