[all-commits] [llvm/llvm-project] 15a313: [X86][AVX] LowerBUILD_VECTOR - reduce 256/512-bit ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Dec 15 02:16:45 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 15a31389b2ead8fa7052a4378b76b5d686d29ad7
      https://github.com/llvm/llvm-project/commit/15a31389b2ead8fa7052a4378b76b5d686d29ad7
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/avx512-shuffles/partial_permute.ll
    M llvm/test/CodeGen/X86/pr29112.ll
    M llvm/test/CodeGen/X86/pr46532.ll
    M llvm/test/CodeGen/X86/shuffle-vs-trunc-512.ll
    M llvm/test/CodeGen/X86/trunc-subvector.ll
    M llvm/test/CodeGen/X86/vector-shuffle-256-v16.ll
    M llvm/test/CodeGen/X86/vector-shuffle-256-v32.ll
    M llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
    M llvm/test/CodeGen/X86/vector-shuffle-512-v16.ll
    M llvm/test/CodeGen/X86/vector-shuffle-512-v8.ll

  Log Message:
  -----------
  [X86][AVX] LowerBUILD_VECTOR - reduce 256/512-bit build vectors with zero/undef upper elements + pad.

As discussed on D92645, we don't do a good job of recognising when we don't require the full width of a ymm/zmm build vector because the upper elements are undef/zero.

This commit allows us to make use of implicit zeroing of upper elements with AVX instructions, which we emulate in DAG with a INSERT_SUBVECTOR into the bottom of a undef/zero vector of the original type.

This exposed a limitation in getTargetConstantBitsFromNode which didn't extract bits from INSERT_SUBVECTORs of different element widths which I've included as well to prevent a couple of regressions.


  Commit: bd0709266911bce2f1e8a875f9ed49d56953f323
      https://github.com/llvm/llvm-project/commit/bd0709266911bce2f1e8a875f9ed49d56953f323
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-12-15 (Tue, 15 Dec 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  [X86] Remove trailing whitespace. NFC.


Compare: https://github.com/llvm/llvm-project/compare/8a7e770638f0...bd0709266911


More information about the All-commits mailing list