[all-commits] [llvm/llvm-project] 251dd7: [x86] add cost overrides for mul with overflow

RotateRight via All-commits all-commits at lists.llvm.org
Fri Oct 30 09:38:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 251dd7c0f999c02304254236bbc48b5f1bb5b2b5
      https://github.com/llvm/llvm-project/commit/251dd7c0f999c02304254236bbc48b5f1bb5b2b5
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/X86/arith-overflow.ll
    M llvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll

  Log Message:
  -----------
  [x86] add cost overrides for mul with overflow

I'm assuming the standard size integer instructions for this end up as something like:
mulq %rsi
seto %al

And the 'mul' generally has reciprocal throughput of 1 on typical implementations
(higher latency, but that's not handled here).
The default costs may end up much higher than that, and that's what we see in the test diffs.

Vector types are left as a 'TODO'.

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




More information about the All-commits mailing list