[llvm-commits] [llvm] r132165 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Devang Patel
dpatel at apple.com
Fri May 27 09:56:39 PDT 2011
On May 26, 2011, at 4:37 PM, Chandler Carruth wrote:
> Author: chandlerc
> Date: Thu May 26 18:37:58 2011
> New Revision: 132165
>
> URL: http://llvm.org/viewvc/llvm-project?rev=132165&view=rev
> Log:
> 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.
Looks good.
Thanks!
-
Devang
>
> Modified:
> llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=132165&r1=132164&r2=132165&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Thu May 26 18:37:58 2011
> @@ -554,8 +554,8 @@
> // 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))
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list