diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-08-15 13:07:14 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-08-15 13:07:14 +0000 |
commit | ed804dad1e6849c5760dee451c5ce6459632d552 (patch) | |
tree | 2024930c179f56e3832c73515476144c1823083d /llvm/lib/CodeGen | |
parent | 2a903c0b679bae1919f9fc01f78e4bc6cff2add0 (diff) | |
download | bcm5719-llvm-ed804dad1e6849c5760dee451c5ce6459632d552.tar.gz bcm5719-llvm-ed804dad1e6849c5760dee451c5ce6459632d552.zip |
[DAGCombine] MergeConsecutiveStores - fix cppcheck/MSVC extension warning. NFCI.
Set the StartIdx type to size_t so that it matches the StoreNodes SmallVector size() and index types.
Silences the MSVC analyzer warning that unsigned increment might overflow before exceeding size_t on 64-bit targets - this isn't likely to happen but it means we use consistent types and reduces the warning "noise" a little.
llvm-svn: 368998
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index d9a77899ca3..57fd6025e49 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -15396,7 +15396,7 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) { bool RV = false; while (StoreNodes.size() > 1) { - unsigned StartIdx = 0; + size_t StartIdx = 0; while ((StartIdx + 1 < StoreNodes.size()) && StoreNodes[StartIdx].OffsetFromBase + ElementSizeBytes != StoreNodes[StartIdx + 1].OffsetFromBase) |