search for: hamming_weight

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

2008 Feb 20
1
[LLVMdev] ctpop intrinsic question
...c Value *LowerCTPOP(Value *V, Instruction *IP) { assert(V->getType()->isInteger() && "Can't ctpop a non-integer type!"); and that the implemented algorithm is essentially the first of the 3 given tree reduction based algorithms given in http://en.wikipedia.org/wiki/Hamming_weight?? How can I emit that intrinsic from LLVMBuilder? What is the correct LLVM textual IR representation? I tried ; ModuleID = 'test' define i64 @popcount(i64 %x) { entry: %tmp = call i64 @llvm.ctpop.i64(i64 %x) ret i64 %tmp } which gives me errors .. I tried several others and read the...