[PATCH] D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 15 14:32:46 PDT 2017
craig.topper added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:7526
+ llvm::Type *ResultType = ConvertType(E->getType());
+ Value *X = EmitScalarExpr(E->getArg(0));
+ llvm::Function *F = CGM.getIntrinsic(Intrinsic::ctpop, ResultType);
----------------
I'm not sure what EmitScalarExpr does, but I got think its not right for a vector argument.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:7527
+ Value *X = EmitScalarExpr(E->getArg(0));
+ llvm::Function *F = CGM.getIntrinsic(Intrinsic::ctpop, ResultType);
+ return Builder.CreateCall(F, X);
----------------
I think you can use Ops[0]->getType() and avoid the call to ConvertType. See the code for BI__builtin_ia32_vplzcntq_512_mask.
Repository:
rL LLVM
https://reviews.llvm.org/D33170
More information about the cfe-commits
mailing list