summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-05-26 23:37:58 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-05-26 23:37:58 +0000
commit07f5b65e637eb8e77ff6310d64f39e668ba967cb (patch)
tree3aaaf6c354eaf9755b5cdfac1e46450b36d38585 /llvm/lib
parentbf22998f21fd61b53ec8b40c6255ec31091c881e (diff)
downloadbcm5719-llvm-07f5b65e637eb8e77ff6310d64f39e668ba967cb.tar.gz
bcm5719-llvm-07f5b65e637eb8e77ff6310d64f39e668ba967cb.zip
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. llvm-svn: 132165
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index dbf0e08607c..eb33fe23e85 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<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))
OpenPOWER on IntegriCloud