[all-commits] [llvm/llvm-project] c13aa3: [X86] Attempt to more accurately model the cost of...

topperc via All-commits all-commits at lists.llvm.org
Thu Mar 19 09:35:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c13aa36bb7d196643be0066404a8e7915a21a3f0
      https://github.com/llvm/llvm-project/commit/c13aa36bb7d196643be0066404a8e7915a21a3f0
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-03-19 (Thu, 19 Mar 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/X86/reduce-and.ll
    M llvm/test/Analysis/CostModel/X86/reduce-or.ll

  Log Message:
  -----------
  [X86] Attempt to more accurately model the cost of a bool reduction of wide vector type.

Previously we multiplied the cost for the table entries by the number of splits needed. But that implies that each split goes through a reduction to scalar independently. I think what really happens is that the we AND/OR the split pieces until we're down to a single value with a legal type and then do special reduction sequence on that.

So to model that this patch takes the number of splits minus one multiplied by the cost of a AND/OR at the legal element count and adds that on top of the table lookup.

Differential Revision: https://reviews.llvm.org/D76400




More information about the All-commits mailing list