[llvm] r193225 - R600/SI: Replace ffs(x) - 1 with countTrailingZeros(x)
Tom Stellard
thomas.stellard at amd.com
Tue Oct 22 20:50:25 PDT 2013
Author: tstellar
Date: Tue Oct 22 22:50:25 2013
New Revision: 193225
URL: http://llvm.org/viewvc/llvm-project?rev=193225&view=rev
Log:
R600/SI: Replace ffs(x) - 1 with countTrailingZeros(x)
ffs(x) broke the mingw buildbot.
Modified:
llvm/trunk/lib/Target/R600/SIISelLowering.cpp
Modified: llvm/trunk/lib/Target/R600/SIISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIISelLowering.cpp?rev=193225&r1=193224&r2=193225&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIISelLowering.cpp Tue Oct 22 22:50:25 2013
@@ -1115,7 +1115,7 @@ void SITargetLowering::adjustWritemask(M
unsigned Comp;
for (unsigned i = 0, Dmask = OldDmask; i <= Lane; i++) {
assert(Dmask);
- Comp = ffs(Dmask)-1;
+ Comp = countTrailingZeros(Dmask);
Dmask &= ~(1 << Comp);
}
More information about the llvm-commits
mailing list