[PATCH] [AArch64] Build correct vector filled with undef nodes

Xu Jiangwei David.Xu at arm.com
Tue Sep 2 00:45:29 PDT 2014

Yes, it is more useful as a generic getConstantSplat(all of the elements of the vector are the same) function in SelectionDAG. But it may not be used frequently as getConstant function. If we want to present a bunch of APIs to generate const splat, more work is needed. For example, we should consider whether the data type is integer or float point. In SelectionDAG, there are 3 getConstant and 3 getConstantFP, thus 6 getConstantSplat functions should be added. 

Here we just do the post-processing of the AllOnes/AllZeros BuildVector. The only disadvantage of my method is we should use ReplaceUndefFromZeroOrOneVector carefully. For this small case which is to fix a bug, I think we need not to add 6 getConstantSplat functions.


More information about the llvm-commits mailing list