[all-commits] [llvm/llvm-project] 054c23: X86: Improve cost model of fp16 conversion (#113195)

Matthias Braun via All-commits all-commits at lists.llvm.org
Fri Oct 25 16:22:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 054c23d78f2e1aba1dd353aec19e00993ca452fa
      https://github.com/llvm/llvm-project/commit/054c23d78f2e1aba1dd353aec19e00993ca452fa
  Author: Matthias Braun <matze at braunis.de>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.h
    A llvm/test/Transforms/SLPVectorizer/X86/conversion-fp16.ll

  Log Message:
  -----------
  X86: Improve cost model of fp16 conversion (#113195)

Improve cost-modeling for x86 __fp16 conversions so the SLPVectorizer
transforms the patterns:

- Override `X86TTIImpl::getStoreMinimumVF` to report a minimum VF of 4 (SSE
  register can hold 4xfloat converted/stored to 4xf16) this is necessary as
  fp16 stores are neither modeled as trunc-stores nor can we mark direct Xxfp16
  stores as legal as we generally expand fp16 operations).
- Add missing cost entries to `X86TTIImpl::getCastInstrCost`
  conversion from/to fp16. Note that conversion from f64 to f16 is not
  supported by an X86 instruction.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list