From: Simon Pilgrim Date: Wed, 8 May 2019 10:07:34 +0000 (+0000) Subject: Fix cppcheck operator precedence warning. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3bf4172934fee848bf688691c883527a6c3dae8;p=llvm Fix cppcheck operator precedence warning. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360234 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index ea75df8e47d..75349cb8e3b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -215,8 +215,8 @@ static SDValue getCopyFromParts(SelectionDAG &DAG, const SDLoc &DL, unsigned ValueBits = ValueVT.getSizeInBits(); // Assemble the power of 2 part. - unsigned RoundParts = NumParts & (NumParts - 1) ? - 1 << Log2_32(NumParts) : NumParts; + unsigned RoundParts = + (NumParts & (NumParts - 1)) ? 1 << Log2_32(NumParts) : NumParts; unsigned RoundBits = PartBits * RoundParts; EVT RoundVT = RoundBits == ValueBits ? ValueVT : EVT::getIntegerVT(*DAG.getContext(), RoundBits);