[llvm] r360234 - Fix cppcheck operator precedence warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 03:07:34 PDT 2019
Author: rksimon
Date: Wed May 8 03:07:34 2019
New Revision: 360234
URL: http://llvm.org/viewvc/llvm-project?rev=360234&view=rev
Log:
Fix cppcheck operator precedence warning. NFCI.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=360234&r1=360233&r2=360234&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed May 8 03:07:34 2019
@@ -215,8 +215,8 @@ static SDValue getCopyFromParts(Selectio
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);
More information about the llvm-commits
mailing list