[all-commits] [llvm/llvm-project] 054e7c: [VectorCombine] foldInsExtVectorToShuffle - ignore...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jan 5 05:05:38 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 054e7c59713c67ad7b65a92e4b8887076d3881b9
      https://github.com/llvm/llvm-project/commit/054e7c59713c67ad7b65a92e4b8887076d3881b9
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2025-01-05 (Sun, 05 Jan 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/PhaseOrdering/X86/hadd.ll
    M llvm/test/Transforms/VectorCombine/X86/load-inseltpoison.ll

  Log Message:
  -----------
  [VectorCombine] foldInsExtVectorToShuffle - ignore shuffle costs for 'identity' insertion masks

<u,1,u,u> 'inplace' single src shuffles can be treated as free identity shuffles - ignore any shuffle cost (similar to what we already do in other folds like foldShuffleOfShuffles) - eventually getShuffleCost should just return TCC_Free in these cases but in a lot of the targets' shuffle cost logic this currently ends up treated as a generic SK_PermuteSingleSrc.

We still want to generate the shuffle as it will help further shuffle folds with the additional PoisonMaskElem 'undemanded' elements.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list