[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 22 10:05:22 PDT 2017
craig.topper accepted this revision.
craig.topper added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/CodeGen/CGBuiltin.cpp:7526
+ llvm::Type *ResultType = ConvertType(E->getType());
+ llvm::Function *F = CGM.getIntrinsic(Intrinsic::ctpop, ResultType);
+ return Builder.CreateCall(F, Ops);
----------------
oren_ben_simhon wrote:
> oren_ben_simhon wrote:
> > craig.topper wrote:
> > > Why did the call to ConvertType come back? This code can just be
> > >
> > >
> > > ```
> > > llvm::Function *F = CGM.getIntrinsic(Intrinsic::ctpop, Ops[0]->getType());
> > > return Builder.CreateCall(F, Ops);
> > > ```
> > After checking it again, I reverted that change because AFAIK Ops[0] is the first argument and not the return type of the statement.
> After checking it again, I reverted that change because AFAIK Ops[0] is the first argument and not the return type of the statement.
That's true, but for this intrinsic they are required to be the same type. But its not a big deal.
Repository:
rL LLVM
https://reviews.llvm.org/D33170
More information about the cfe-commits
mailing list