[all-commits] [llvm/llvm-project] 5aee27: [CostModel][X86] Add CostKinds handling for fdiv ops

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Sep 3 07:50:58 PDT 2022


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

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.h
    M llvm/test/Analysis/CostModel/X86/arith-fp-latency.ll
    M llvm/test/Analysis/CostModel/X86/arith-fp-sizelatency.ll

  Log Message:
  -----------
  [CostModel][X86] Add CostKinds handling for fdiv ops

This was achieved with an updated version of the 'cost-tables vs llvm-mca' script D103695

As we're using 'typical' worst case values, not all cost entries come from a single CPU - e.g. the latency/throughput from haswell but the size-latency(uops) from zen1/alderlake-e due to 'double pumping'

As the uop count (used for TCK_SizeAndLatency) for divss/divps is typically so low, we need to override isExpensiveToSpeculativelyExecute to ensure we keep fdiv calls behind branches - although for some very recent cpu targets it might not be necessary any more and could be relaxed.




More information about the All-commits mailing list