Supports popcnt on vector masks (e.g. <8 x i1>)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
}
//////////////////////////////////////////////////////////////////////////
+ /// @brief pop count on vector mask (e.g. <8 x i1>)
+ Value* Builder::VPOPCNT(Value* a)
+ {
+ Value* b = BITCAST(VMASK(a), mSimdFP32Ty);
+ return POPCNT(VMOVMSKPS(b));
+ }
+
+ //////////////////////////////////////////////////////////////////////////
/// @brief C functions called by LLVM IR
//////////////////////////////////////////////////////////////////////////
CallInst *PRINT(const std::string &printStr,const std::initializer_list<Value*> &printArgs);
Value* POPCNT(Value* a);
+Value* VPOPCNT(Value* a);
Value* DEBUGTRAP();
Value* INT3() { return DEBUGTRAP(); }