From: Mark Searles Date: Mon, 9 Jul 2018 19:28:14 +0000 (+0000) Subject: [AMDGPU][Waitcnt] fix "comparison of integers of different signs" build error X-Git-Tag: android-x86-8.1-r1~1089 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=28793aedf683a9270754c67dbebdc13bd9119ea7;p=android-x86%2Fexternal-llvm.git [AMDGPU][Waitcnt] fix "comparison of integers of different signs" build error Build error on Android; reported by and fix provided by (thanks) by Mauro Rossi 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 >::difference_type' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare] BlockWaitcntProcessedSet.end(), &MBB) < Count)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ 1 error generated. Differential Revision: https://reviews.llvm.org/D49089 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336588 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/lib/Target/AMDGPU/SIInsertWaitcnts.cpp index c404a6d291b..913e22ea381 100644 --- a/lib/Target/AMDGPU/SIInsertWaitcnts.cpp +++ b/lib/Target/AMDGPU/SIInsertWaitcnts.cpp @@ -1904,7 +1904,7 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) { // 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';);