[PATCH] D17176: [CodeGen] Add getBuildVector and getSplatBuildVector helpers.

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 17:36:06 PST 2016


ab added a comment.

In http://reviews.llvm.org/D17176#351364, @spatel wrote:

> I didn't look closely enough to know if this would help here, but it could shave a couple of lines off of the current http://reviews.llvm.org/D17181 patch: DAG.getConstant() has the unadvertised feature (no documentation or implementation comments) of creating splat build vector constants.


Interesting, I didn't know! Let me add a comment and use that instead.

I do think that the name "getConstant" could be confusing. In practice I don't think it's a problem, with proper names and context.  That's not ideal though, so perhaps we should add "getConstantVec" (or "getConstantSplat"?) versions of the 6 getConstant variants we already have?


http://reviews.llvm.org/D17176





More information about the llvm-commits mailing list