[all-commits] [llvm/llvm-project] 9abc59: [TargetLowering][InstCombine] Simplify BSwap deman...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Jan 20 10:45:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9abc593e98891b4cd8ffd2ca308cabe6ea5d142f
      https://github.com/llvm/llvm-project/commit/9abc593e98891b4cd8ffd2ca308cabe6ea5d142f
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-01-20 (Thu, 20 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

  Log Message:
  -----------
  [TargetLowering][InstCombine] Simplify BSwap demanded bits code a little. NFC

Use alignDown instead of &= ~7.

Replace ResultBit with NLZ. (BitWidth - NLZ - NTZ == 8) so
(BitWidth - NTZ - 8 == NLZ).

Reviewed By: spatel

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




More information about the All-commits mailing list