diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index dbf0e08607c3..eb33fe23e85c 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -554,8 +554,8 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) { // find a node corresponding to the value. if (DbgValueInst *DVI = dyn_cast(CI)) if (Instruction *VI = dyn_cast_or_null(DVI->getValue())) - if (!VI->isTerminator() && - DVI->getParent() != VI->getParent() || DT->dominates(DVI, VI)) { + if (!VI->isTerminator() && + (DVI->getParent() != VI->getParent() || DT->dominates(DVI, VI))) { DEBUG(dbgs() << "Moving Debug Value before :\n" << *DVI << ' ' << *VI); DVI->removeFromParent(); if (isa(VI))