diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-05-26 23:37:58 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-05-26 23:37:58 +0000 |
commit | b29c1d731a4c8aeab0d230d8dd3f0cff30b73d2f (patch) | |
tree | 1ef9d7357e9fb5fc6e4a59adb82280617a191080 | |
parent | 77ba0164fe631e573aec216dd44ea18a1cd76df4 (diff) | |
download | external_llvm-b29c1d731a4c8aeab0d230d8dd3f0cff30b73d2f.zip external_llvm-b29c1d731a4c8aeab0d230d8dd3f0cff30b73d2f.tar.gz external_llvm-b29c1d731a4c8aeab0d230d8dd3f0cff30b73d2f.tar.bz2 |
Fix warning about || and && without explicit grouping.
This looks like it flagged an actual bug. Devang, please review. I added
the parentheses that change behavior, but make the behavior more closely
match commit log's intent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132165 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index dbf0e08..eb33fe2 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/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<DbgValueInst>(CI)) if (Instruction *VI = dyn_cast_or_null<Instruction>(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<PHINode>(VI)) |