[llvm-commits] [PATCH] Add support for lowering FNEG with AVX
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Dec 14 16:39:31 PST 2011
On Dec 14, 2011, at 4:37 PM, Chad Rosier wrote:
>
> On Dec 14, 2011, at 4:27 PM, Bruno Cardoso Lopes wrote:
>>
>> + if (NumBits == 256) {
>> + CV.push_back(C);
>> + CV.push_back(C);
>> + }
>> } else {
>> Constant *C = ConstantFP::get(*Context, APFloat(APInt(32, 1U << 31)));
>> CV.push_back(C);
>> CV.push_back(C);
>> CV.push_back(C);
>> CV.push_back(C);
>> + if (NumBits == 256) {
>> + CV.push_back(C);
>> + CV.push_back(C);
>> + CV.push_back(C);
>> + CV.push_back(C);
>> + }
>>
>> If you iterate over the number of elements to push_back the constants,
>> you can make it more general and don't need to get the size here.
>
> Sure, easy fix.
Note that SmallVector has these methods:
void append(size_type NumInputs, const T &Elt);
void assign(unsigned NumElts, const T &Elt);
/jakob
More information about the llvm-commits
mailing list