[llvm-commits] [PATCH] Add support for lowering FNEG with AVX
Chad Rosier
mcrosier at apple.com
Wed Dec 14 17:06:57 PST 2011
On Dec 14, 2011, at 4:53 PM, Bruno Cardoso Lopes wrote:
> On Wed, Dec 14, 2011 at 10:39 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>>
>> 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);
>
> Better yet! :)
>
Committed revision 146625.
Thanks, Bruno and Jakob.
Chad
> --
> Bruno Cardoso Lopes
> http://www.brunocardoso.cc
More information about the llvm-commits
mailing list