[all-commits] [llvm/llvm-project] e3ec5a: [VectorCombine] foldShuffleOfBinops - fold shuffle...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jan 3 02:29:28 PST 2025


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

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

  Log Message:
  -----------
  [VectorCombine] foldShuffleOfBinops - fold shuffle(binop(shuffle(x),shuffle(z)),binop(shuffle(y),shuffle(w)) -> binop(shuffle(x,z),shuffle(y,w)) (#120984)

Some patterns (in particular horizontal style patterns) can end up with shuffles straddling both sides of a binop/cmp.

Where individually the folds aren't worth it, by merging the (oneuse) shuffles we can notably reduce the net instruction count and cost.

One of the final steps towards finally addressing #34072



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