[all-commits] [llvm/llvm-project] 47941d: [CostModel][X86] Adjust fp<->int vXi32 AVX1+ costs...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Jun 30 07:34:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47941d601debe2d543a5f9452c777072c708ccdd
      https://github.com/llvm/llvm-project/commit/47941d601debe2d543a5f9452c777072c708ccdd
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-06-30 (Wed, 30 Jun 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/X86/cast.ll
    M llvm/test/Analysis/CostModel/X86/fptosi.ll
    M llvm/test/Analysis/CostModel/X86/fptoui.ll
    M llvm/test/Analysis/CostModel/X86/sitofp.ll
    M llvm/test/Analysis/CostModel/X86/uitofp.ll
    M llvm/test/Transforms/SLPVectorizer/X86/fptoui.ll
    M llvm/test/Transforms/SLPVectorizer/X86/sitofp-inseltpoison.ll
    M llvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
    M llvm/test/Transforms/SLPVectorizer/X86/uitofp.ll

  Log Message:
  -----------
  [CostModel][X86] Adjust fp<->int vXi32 AVX1+ costs based on llvm-mca reports

Based off the worse case numbers generated by D103695, the AVX1/2/512 sitofp/uitofp/fptosi/fptoui costs were higher than necessary (based off instruction counts instead of actual throughput).

The SSE costs still need further fixes, but I hit an issue with the order in which SSE costs are checked - we need to check CUSTOM costs (with non-legal types) first, and then fallback to LEGALIZED types. I'm looking at this now, and this should let us start thinning out a lot of the duplicates in the costs tables.

Then we can finally start work on vXi64 / vXi16 / vXi8 / vXi1 integers, which should let us look at sub-128-bit vectorization (D103925).




More information about the All-commits mailing list