1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

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
This commit is contained in:
Chandler Carruth 2011-05-26 23:37:58 +00:00
parent 5e3f883ddf
commit 6a41ac0d30

View File

@ -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))