From: Quentin Colombet Date: Thu, 27 Mar 2014 22:27:41 +0000 (+0000) Subject: [X86][Vector Cost Model] Add a comment to explain the workaround X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d5f800aab34ae03ecd3b2d4618aa0baba53fe8ab;p=oota-llvm.git [X86][Vector Cost Model] Add a comment to explain the workaround in my previous commit (r204884). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204972 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp index 2d44db0acdb..f58c94683fd 100644 --- a/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/lib/Target/X86/X86TargetTransformInfo.cpp @@ -512,6 +512,11 @@ unsigned X86TTI::getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) const { { 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 },