search for: popcnt_simple

Displaying 1 result from an estimated 1 matches for "popcnt_simple".

2018 Jun 02
2
LoopIdiomRecognize is not recognizing the ctpop idiom
Hello. Could you please tell me why am I not able to recognize (with LLVM built from the SVN code in Apr 25, 2018) the LLVM IR intrinsic ctpop (described at https://llvm.org/docs/LangRef.html#llvm-ctpop-intrinsic) in the following program: int PopCnt_Simple(int x) { int numBits = 0; int i; //for (i = 0; i < 32; i++) { for (i = 0; x != 0; i++) { if (x & 1) numBits++; x >>= 1; } return numBits; } I also did check...