[all-commits] [llvm/llvm-project] e22908: [X86] ReplaceNodeResults - widen sub-128-bit vecto...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Aug 4 09:36:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e22908692c9b50ed5a96fec9d402f3fb099f7ffd
      https://github.com/llvm/llvm-project/commit/e22908692c9b50ed5a96fec9d402f3fb099f7ffd
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/avx512-vec-cmp.ll
    M llvm/test/CodeGen/X86/buildvec-insertvec.ll
    M llvm/test/CodeGen/X86/fpclamptosat_vec.ll
    M llvm/test/CodeGen/X86/masked_store_trunc_ssat.ll
    M llvm/test/CodeGen/X86/masked_store_trunc_usat.ll
    M llvm/test/CodeGen/X86/pmulh.ll
    M llvm/test/CodeGen/X86/vector-trunc-packus.ll
    M llvm/test/CodeGen/X86/vector-trunc-ssat.ll
    M llvm/test/CodeGen/X86/vector-trunc-usat.ll

  Log Message:
  -----------
  [X86] ReplaceNodeResults - widen sub-128-bit vector truncations if it would allow them to use PACKSS/PACKUS

We currently just scalarize sub-128-bit vector truncations, but if the input vector has sufficient signbits/zerobits then we should try to use PACKSS/PACKUS with a widened vector with don't care upper elements. Shuffle lowering will struggle to detect this if we wait until the scalarization has been revectorized as a shuffle.

Another step towards issue #63710




More information about the All-commits mailing list