[Patch] X86 horizontal vector reduction cost model

Arnold Schwaighofer aschwaighofer at apple.com
Wed Sep 18 14:06:13 PDT 2013


It seems that “AVX1CostTblPairWise” and “AVX2CostTblPairWise” are identical (same for the NoPairwise versions). Lets merge them until we have better data. Lets delete the “AVX2Cost…” versions and delete the two AVX2 lookups:

+    if (ST->hasAVX2()) {
+      int Idx = CostTableLookup(AVX2CostTblPairWise, ISD, MTy);
+      if (Idx != -1)
+        return LT.first * AVX2CostTblPairWise[Idx].Cost;
+    }




+    { ISD::ADD,   MVT::v2i64,   2 },      // The raw data is 1.6

Punctuation “.” at the end:
// The raw data is 1.6.

Same on all the following comments.

+unsigned X86TTI::getReductionCost(unsigned Opcode, Type *ValTy,
+                                     bool IsPairwise) const {
whitespace.                       ^^^^


Otherwise, LGTM

Thanks

On Sep 18, 2013, at 3:50 PM, yijiang <yjiang at apple.com> wrote:

> <X86-costmodel.patch>





More information about the llvm-commits mailing list