[all-commits] [llvm/llvm-project] c931d3: [CostModel][X86] Increase i64 mul cost from 1 to 2

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Sep 23 07:03:35 PDT 2021


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

  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/arith.ll
    M llvm/test/Analysis/CostModel/X86/rem.ll
    M llvm/test/Analysis/CostModel/X86/slm-arith-costs.ll
    M llvm/test/Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll
    M llvm/test/Transforms/SLPVectorizer/X86/arith-fix.ll
    M llvm/test/Transforms/SLPVectorizer/X86/arith-mul.ll

  Log Message:
  -----------
  [CostModel][X86] Increase i64 mul cost from 1 to 2

Only the most recent cpus support really 1cy 64-bit multiplies, and the X64 cost table represents a realistic worst case. The 1cy value was also discouraging vectorization when most vXi64 PMULDQ expansions aren't actually slower than scalarization.

Noticed while investigating PR51436.




More information about the All-commits mailing list