[all-commits] [llvm/llvm-project] 136f98: [x86] adjust cost model values for minnum/maxnum w...

RotateRight via All-commits all-commits at lists.llvm.org
Tue Dec 1 08:21:23 PST 2020


  Branch: refs/heads/temp-test-main
  Home:   https://github.com/llvm/llvm-project
  Commit: 136f98e5236522f55693b8b2d23e87692987f734
      https://github.com/llvm/llvm-project/commit/136f98e5236522f55693b8b2d23e87692987f734
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/X86/fmaxnum.ll
    M llvm/test/Analysis/CostModel/X86/fminnum.ll

  Log Message:
  -----------
  [x86] adjust cost model values for minnum/maxnum with fast-math-flags

Without FMF, we lower these intrinsics into something like this:

vmaxsd	%xmm0, %xmm1, %xmm2
vcmpunordsd	%xmm0, %xmm0, %xmm0
vblendvpd	%xmm0, %xmm1, %xmm2, %xmm0

But if we can ignore NANs, the single min/max instruction is enough
because there is no need to fix up the x86 logic that corresponds to
X > Y ? X : Y.

We probably want to make other adjustments for FP intrinsics with FMF
to account for specialized codegen (for example, FSQRT).

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




More information about the All-commits mailing list