[all-commits] [llvm/llvm-project] 0ec028: [CostModel][X86] Add CostKinds handling for vector...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Sep 15 06:05:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ec028fe105b9bcdda4196cc8803205a1577c12a
      https://github.com/llvm/llvm-project/commit/0ec028fe105b9bcdda4196cc8803205a1577c12a
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/X86/arith-fix.ll
    M llvm/test/Analysis/CostModel/X86/arith-overflow.ll
    M llvm/test/Analysis/CostModel/X86/div-codesize.ll
    M llvm/test/Analysis/CostModel/X86/div-latency.ll
    M llvm/test/Analysis/CostModel/X86/div-sizelatency.ll
    M llvm/test/Analysis/CostModel/X86/div.ll
    M llvm/test/Analysis/CostModel/X86/fshl.ll
    M llvm/test/Analysis/CostModel/X86/fshr.ll
    M llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
    M llvm/test/Analysis/CostModel/X86/mul.ll
    M llvm/test/Analysis/CostModel/X86/rem-codesize.ll
    M llvm/test/Analysis/CostModel/X86/rem-latency.ll
    M llvm/test/Analysis/CostModel/X86/rem-sizelatency.ll
    M llvm/test/Analysis/CostModel/X86/rem.ll
    M llvm/test/Analysis/CostModel/X86/uniformshift-inseltpoison.ll
    M llvm/test/Analysis/CostModel/X86/uniformshift.ll
    M llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll
    M llvm/test/Analysis/CostModel/X86/vshift-ashr-cost-inseltpoison.ll
    M llvm/test/Analysis/CostModel/X86/vshift-ashr-cost.ll
    M llvm/test/Analysis/CostModel/X86/vshift-ashr-latency.ll
    M llvm/test/Analysis/CostModel/X86/vshift-ashr-sizelatency.ll
    M llvm/test/Analysis/CostModel/X86/vshift-lshr-codesize.ll
    M llvm/test/Analysis/CostModel/X86/vshift-lshr-cost-inseltpoison.ll
    M llvm/test/Analysis/CostModel/X86/vshift-lshr-cost.ll
    M llvm/test/Analysis/CostModel/X86/vshift-lshr-latency.ll
    M llvm/test/Analysis/CostModel/X86/vshift-lshr-sizelatency.ll
    M llvm/test/Analysis/CostModel/X86/vshift-shl-codesize.ll
    M llvm/test/Analysis/CostModel/X86/vshift-shl-cost-inseltpoison.ll
    M llvm/test/Analysis/CostModel/X86/vshift-shl-cost.ll
    M llvm/test/Analysis/CostModel/X86/vshift-shl-latency.ll
    M llvm/test/Analysis/CostModel/X86/vshift-shl-sizelatency.ll
    M llvm/test/Transforms/LoopVectorize/X86/uniformshift.ll

  Log Message:
  -----------
  [CostModel][X86] Add CostKinds handling for vector shift by uniform/constuniform ops

Vector shift by const uniform is the cheapest shift instruction we have, non-const uniform have a marginally higher cost - some targets 'splat' the amount internally to use the shift-per-element instruction, others see a higher cost for the explicit zeroing of the upper bits for the (64-bit) shift amount.

This was achieved with an updated version of the 'cost-tables vs llvm-mca' script D103695 (I'll update the patch soon for reference)




More information about the All-commits mailing list