[all-commits] [llvm/llvm-project] 29c89d: [VectorCombine] foldShuffleOfShuffles - fold "shuf...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Dec 23 06:56:36 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 29c89d7265329c530a6a2cb0307218004cc2ba53
      https://github.com/llvm/llvm-project/commit/29c89d7265329c530a6a2cb0307218004cc2ba53
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-12-23 (Mon, 23 Dec 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/PhaseOrdering/X86/hadd.ll
    M llvm/test/Transforms/VectorCombine/AArch64/select-shuffle.ll

  Log Message:
  -----------
  [VectorCombine] foldShuffleOfShuffles - fold "shuffle (shuffle x, y, m1), (shuffle y, x, m2)" -> "shuffle x, y, m3" (#120959)

foldShuffleOfShuffles currently only folds unary shuffles to ensure we don't end up with a merged shuffle with more than 2 sources, but this prevented cases where both shuffles were sharing sources.

This patch generalizes the merge process to find up to 2 sources as it merges with the inner shuffles, it also moves the undef/poison handling stages into the merge loop as well.

Fixes #120764



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