[all-commits] [llvm/llvm-project] 255e44: X86: Do not return invalid cost for fp16 conversio...

Matthias Braun via All-commits all-commits at lists.llvm.org
Tue Oct 29 17:16:40 PDT 2024


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

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

  Log Message:
  -----------
  X86: Do not return invalid cost for fp16 conversion (#114128)

Returning invalid instruction costs when converting from/to fp16 in
`X86TTIImpl::getCastInstrCost` when there is no hardware support
available was triggering asserts. This changes the code to return a
large (arbitrary) number to model the fact that libcalls are used to
implement the conversion.

This also simplifies the code by only reporting costs for the scalar
fp16 conversion; vectorized costs being left to the fallback assuming
scalarization.

This is a follow-up to assertion issues reported for the changes in
#113195



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