From: Tom Stellard Date: Wed, 23 Oct 2013 03:50:25 +0000 (+0000) Subject: R600/SI: Replace ffs(x) - 1 with countTrailingZeros(x) X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9242b73286f050c53a26225b2a9acd14aeaa91da;p=oota-llvm.git R600/SI: Replace ffs(x) - 1 with countTrailingZeros(x) ffs(x) broke the mingw buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193225 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/R600/SIISelLowering.cpp b/lib/Target/R600/SIISelLowering.cpp index b37d5b282b2..371572e31a1 100644 --- a/lib/Target/R600/SIISelLowering.cpp +++ b/lib/Target/R600/SIISelLowering.cpp @@ -1115,7 +1115,7 @@ void SITargetLowering::adjustWritemask(MachineSDNode *&Node, unsigned Comp; for (unsigned i = 0, Dmask = OldDmask; i <= Lane; i++) { assert(Dmask); - Comp = ffs(Dmask)-1; + Comp = countTrailingZeros(Dmask); Dmask &= ~(1 << Comp); }