[all-commits] [llvm/llvm-project] b29830: [CostModel][X86] fptosi/fptoui to i8/i16 are trunc...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Jul 6 09:40:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b298308ba2544a00c3e2ae0c1cc06fa058a4000c
      https://github.com/llvm/llvm-project/commit/b298308ba2544a00c3e2ae0c1cc06fa058a4000c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-07-06 (Tue, 06 Jul 2021)

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

  Log Message:
  -----------
  [CostModel][X86] fptosi/fptoui to i8/i16 are truncated from fptosi to i32

Provide a generic fallback that performs the fptosi to i32 types, then truncates to sub-i32 scalars.

These numbers can be tweaked for specific sse levels, but we should get the default handling in place first.




More information about the All-commits mailing list