[all-commits] [llvm/llvm-project] c74d72: [X86] combineExtractSubvector - fold extract_subve...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Apr 10 03:03:27 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c74d729bd63b7176cb8446b8fa7d0c16bcc8af0e
      https://github.com/llvm/llvm-project/commit/c74d729bd63b7176cb8446b8fa7d0c16bcc8af0e
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-04-10 (Sun, 10 Apr 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vector-shuffle-v192.ll

  Log Message:
  -----------
  [X86] combineExtractSubvector - fold extract_subvector(insert_subvector(V,X,C1),C1)

extract_subvector(insert_subvector(V,X,C1),C1) -> insert_subvector(extract_subvector(V,C1),X,0)

More aggressively attempt to reduce the width of an extract_subvector source - we currently only do this if we're inserting into a zero vector (i.e. canonicalizing to the AVX implicit zero upper elts pattern).

But if we're extracting from the same point as the inner insert_subvector then the fold is still relatively trivial - we can probably do even better if we can ensure the subvector isn't badly split.




More information about the All-commits mailing list