[all-commits] [llvm/llvm-project] 9dbeac: [X86] ReplaceNodeResults - fp_to_sint/uint - manua...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jul 9 04:08:03 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vec-strict-fptoint-128.ll
    M llvm/test/CodeGen/X86/vec_cast3.ll
    M llvm/test/CodeGen/X86/vec_fp_to_int.ll

  Log Message:
  -----------
  [X86] ReplaceNodeResults - fp_to_sint/uint - manually widen v2i32 results to let us add AssertSext/AssertZext

Its proving tricky to move this to the generic legalizer code, so manually insert the v2i32 subvector into v4i32, insert the AssertSext/AssertZext node, then extract the subvector again.

This avoids masks in the truncation/pack code, which means we avoid a PSHUFB in the fp_to_sint/uint code for sub-128 bit types (specific targets can still combine the packs to a pshufb if they have fast variable per-lane shuffles).

This was noticed when I was trying to improve fp_to_sint/uint costs with D103695 (and some targets had very high fp_to_sint costs due to the PSHUFB), so we can then update the fp_to_uint codegen from D89697.


  Commit: 1440d4564f79b2f7bee8fc25fc9596f10c6aa3a6
      https://github.com/llvm/llvm-project/commit/1440d4564f79b2f7bee8fc25fc9596f10c6aa3a6
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-07-09 (Fri, 09 Jul 2021)

  Changed paths:
    M lld/ELF/SyntheticSections.cpp

  Log Message:
  -----------
  Fix MSVC "not all control paths return a value" warning. NFCI.


Compare: https://github.com/llvm/llvm-project/compare/9c5e65691e12...1440d4564f79


More information about the All-commits mailing list