Displaying 1 result from an estimated 1 matches for "popcount_yang_i32".
2018 Jun 02
2
LoopIdiomRecognize is not recognizing the ctpop idiom
...if (x & 1)
numBits++;
x >>= 1;
}
return numBits;
}
I also did check the following code, getting inspired from the discussion at
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20121119/156300.html:
int popcount_Yang_i32(int a) {
int c = 0;
while (a) {
c++;
//... // both a & c would be used multiple times in or out of
//loop
a &= a - 1;
//...
}
return c;
}...