[llvm] r204972 - [X86][Vector Cost Model] Add a comment to explain the workaround

Quentin Colombet qcolombet at apple.com
Thu Mar 27 16:21:13 PDT 2014


On Mar 27, 2014, at 4:15 PM, Eric Christopher <echristo at gmail.com> wrote:

> On Thu, Mar 27, 2014 at 3:27 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>> Author: qcolombet
>> Date: Thu Mar 27 17:27:41 2014
>> New Revision: 204972
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=204972&view=rev
>> Log:
>> [X86][Vector Cost Model] Add a comment to explain the workaround
>> in my previous commit (r204884).
>> 
>> <rdar://problem/16381225>
> 
> Thanks for following up on this Quentin!
Sure!

If Adam did not pushed for a comment, I wouldn’t have known I was working around a bug :).

-Quentin

> 
> -eric
> 
>> 
>> Modified:
>>    llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
>> 
>> Modified: llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp?rev=204972&r1=204971&r2=204972&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp Thu Mar 27 17:27:41 2014
>> @@ -512,6 +512,11 @@ unsigned X86TTI::getCastInstrCost(unsign
>>     { ISD::UINT_TO_FP,  MVT::v4f64, MVT::v4i8,  2 },
>>     { ISD::UINT_TO_FP,  MVT::v4f64, MVT::v4i16, 2 },
>>     { ISD::UINT_TO_FP,  MVT::v4f64, MVT::v4i32, 6 },
>> +    // The generic code to compute the scalar overhead is currently broken.
>> +    // Workaround this limitation by estimating the scalarization overhead
>> +    // here. We have roughly 10 instructions per scalar element.
>> +    // Multiply that by the vector width.
>> +    // FIXME: remove that when PR19268 is fixed.
>>     { ISD::UINT_TO_FP,  MVT::v2f64, MVT::v2i64, 2*10 },
>>     { ISD::UINT_TO_FP,  MVT::v4f64, MVT::v4i64, 4*10 },
>> 
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list