[all-commits] [llvm/llvm-project] 7e054c: [VectorCombine] foldShuffleOfCastops - don't restr...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Jul 8 07:00:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e054c33d42b0a6bc8f6b168dab688f8e7762ef0
      https://github.com/llvm/llvm-project/commit/7e054c33d42b0a6bc8f6b168dab688f8e7762ef0
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-07-08 (Mon, 08 Jul 2024)

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

  Log Message:
  -----------
  [VectorCombine] foldShuffleOfCastops - don't restrict to oneuse but compare total costs instead

Some casts (especially bitcasts but others as well) are incredibly cheap (or free), so don't limit the shuffle(cast(x),cast(y)) -> cast(shuffle(x,y)) to oneuse cases, but instead compare the total before/after costs of possibly repeating some casts.



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