[all-commits] [llvm/llvm-project] 609d0c: [InstCombine] matchBSwapOrBitReverse - remove patt...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Feb 20 05:16:02 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 609d0c9772161ddbab148435b46efd71ba6754e3
      https://github.com/llvm/llvm-project/commit/609d0c9772161ddbab148435b46efd71ba6754e3
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-02-20 (Sat, 20 Feb 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineInternal.h

  Log Message:
  -----------
  [InstCombine] matchBSwapOrBitReverse - remove pattern matching early-out. NFCI.

recognizeBSwapOrBitReverseIdiom + collectBitParts have pattern matching to bail out early if a bswap/bitreverse pattern isn't possible - we should be able to rely on this instead without any notable change in compile time.

This is part of a cleanup towards letting matchBSwapOrBitReverse /recognizeBSwapOrBitReverseIdiom use 'root' instructions that aren't ORs (FSHL/FSHRs in particular which can be prematurely created).

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




More information about the All-commits mailing list