[all-commits] [llvm/llvm-project] 3aa93f: [InstCombine] recognizeBSwapOrBitReverseIdiom - su...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Oct 3 07:04:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3aa93f690b097257e9a2e48b133c4f413bc3ed92
      https://github.com/llvm/llvm-project/commit/3aa93f690b097257e9a2e48b133c4f413bc3ed92
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-10-03 (Sat, 03 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/test/Transforms/InstCombine/bswap.ll

  Log Message:
  -----------
  [InstCombine] recognizeBSwapOrBitReverseIdiom - support for 'partial' bswap patterns (PR47191) (Reapplied)

If we're bswap'ing some bytes and zero'ing the remainder we can perform this as a bswap+mask which helps us match 'partial' bswaps as a first step towards folding into a more complex bswap pattern.

Reapplied with early-out if recognizeBSwapOrBitReverseIdiom collects a source wider than the result type.

Differential Revision: https://reviews.llvm.org/D88578




More information about the All-commits mailing list