[all-commits] [llvm/llvm-project] a403ad: [VectorCombine] foldBitcastShuffle - limit bitcast...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Apr 11 03:43:47 PDT 2024


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

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/X86/shuffle.ll

  Log Message:
  -----------
  [VectorCombine] foldBitcastShuffle - limit bitcast(shuffle(x,y)) -> shuffle(bitcast(x),bitcast(y))

Only fold bitcast(shuffle(x,y)) -> shuffle(bitcast(x),bitcast(y)) if we won't actually increase the number of bitcasts (i.e. x or y is already bitcasted from the correct type).


  Commit: 717d3f3974f43d90c1b8829a4077bbc2a2413c83
      https://github.com/llvm/llvm-project/commit/717d3f3974f43d90c1b8829a4077bbc2a2413c83
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-04-11 (Thu, 11 Apr 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/X86/shuffle-of-casts.ll

  Log Message:
  -----------
  [VectorCombine] foldShuffleOfCastops - add initial shuffle(bitcast(x),bitcast(y)) -> bitcast(shuffle(x,y)) support

Just handle cases where the bitcast src/dst element counts are the same (future patches will add shuffle mask scaling)


Compare: https://github.com/llvm/llvm-project/compare/e2d482395992...717d3f3974f4

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