diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 88c6f18c6ed..47ef1c91749 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -216,13 +216,12 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) { if (DbgDeclareInst *DDI = dyn_cast(I)) { if (DDI->getAddress()) return false; - else - return true; - } else if (DbgValueInst *DVI = dyn_cast(I)) { + return true; + } + if (DbgValueInst *DVI = dyn_cast(I)) { if (DVI->getValue()) return false; - else - return true; + return true; } if (!I->mayHaveSideEffects()) return true;