[PATCH] D49089: [AMDGPU][Waitcnt] fix "comparison of integers of different signs" build error
Mark Searles via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 9 10:17:35 PDT 2018
msearles created this revision.
msearles added reviewers: arsenm, kzhuravl.
msearles added a project: AMDGPU.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng.
Build error on Android; reported/fix provided by Mauro Rossi <issor.oruam at gmail.com> (thanks)
Fixes the following building error:
external/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1903:61:
error: comparison of integers of different signs:
'typename iterator_traits<__wrap_iter<MachineBasicBlock **> >::difference_type'
(aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
BlockWaitcntProcessedSet.end(), &MBB) < Count)) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
1 error generated.
https://reviews.llvm.org/D49089
Files:
lib/Target/AMDGPU/SIInsertWaitcnts.cpp
Index: lib/Target/AMDGPU/SIInsertWaitcnts.cpp
===================================================================
--- lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -1904,7 +1904,7 @@
// If the loop has multiple back-edges, and so more than one "bottom"
// basic block, we have to guarantee a re-walk over every blocks.
if ((std::count(BlockWaitcntProcessedSet.begin(),
- BlockWaitcntProcessedSet.end(), &MBB) < Count)) {
+ BlockWaitcntProcessedSet.end(), &MBB) < (int)Count)) {
BlockWaitcntBracketsMap[&MBB]->setRevisitLoop(true);
LLVM_DEBUG(dbgs() << "set-revisit1: Block"
<< ContainingLoop->getHeader()->getNumber() << '\n';);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49089.154635.patch
Type: text/x-patch
Size: 776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180709/7b666295/attachment.bin>
More information about the llvm-commits
mailing list