[all-commits] [llvm/llvm-project] 071671: [X86] Allow pre-SSE41 targets to extract multiple ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Jul 31 09:08:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 071671e15c3eda59165db435b102fbeb1c673a29
      https://github.com/llvm/llvm-project/commit/071671e15c3eda59165db435b102fbeb1c673a29
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-07-31 (Mon, 31 Jul 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/bitcast-vector-bool.ll
    M llvm/test/CodeGen/X86/pr63108.ll
    M llvm/test/CodeGen/X86/subvectorwise-store-of-vector-splat.ll

  Log Message:
  -----------
  [X86] Allow pre-SSE41 targets to extract multiple v16i8 elements coming from the same DWORD/WORD super-element

Pre-SSE41 targets tended to have weak (serial) GPR<->VEC moves, meaning we only allowed a single v16i8 extraction before spilling the vector to stack and loading the i8 elements instead. But this didn't make use of the DWORD/WORD extraction we had to use could extract multiple i8 elements at the same time.

This patch attempts to determine if all uses of a vector are element extractions, and works out whether all the extractions share the same WORD or (lowest) DWORD, in which case we can perform a single extraction and just shift/truncate the individual elements.

Differential Revision: https://reviews.llvm.org/D156350




More information about the All-commits mailing list