diff options
author | Fangrui Song <maskray@google.com> | 2019-02-10 09:25:56 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-02-10 09:25:56 +0000 |
commit | 709a3e7488ee7c150bc965d6adcbe5ecf9cbd7a4 (patch) | |
tree | 002b0ccba3db952a007c40ecb8e1a397200d167c | |
parent | 5cb317315cb7bf96cfa6a0300f9ba6f9188c7f2a (diff) | |
download | bcm5719-llvm-709a3e7488ee7c150bc965d6adcbe5ecf9cbd7a4.tar.gz bcm5719-llvm-709a3e7488ee7c150bc965d6adcbe5ecf9cbd7a4.zip |
[Local] Delete a redundant check. NFC
isInstructionTriviallyDead also performs the use_empty() check.
llvm-svn: 353637
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 062bbcdae2c..933a69caaaa 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/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<Instruction>(V); - if (!I || !I->use_empty() || !isInstructionTriviallyDead(I, TLI)) + if (!I || !isInstructionTriviallyDead(I, TLI)) return false; SmallVector<Instruction*, 16> DeadInsts; |