[all-commits] [llvm/llvm-project] 046458: [PowerPC] Combine 64-bit bswap(load) without LDBRX

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Thu Jun 24 13:12:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0464586ac515e8cfebe4c7615387fd625c8869f5
      https://github.com/llvm/llvm-project/commit/0464586ac515e8cfebe4c7615387fd625c8869f5
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/bswap-load-store.ll
    A llvm/test/CodeGen/PowerPC/ld-bswap64-no-ldbrx.ll

  Log Message:
  -----------
  [PowerPC] Combine 64-bit bswap(load) without LDBRX

When targeting CPUs that don't have LDBRX, we end up producing code that is
very inefficient and large for this common idiom. This patch just
optimizes it two 32-bit LWBRX instructions along with a merge.

This fixes https://bugs.llvm.org/show_bug.cgi?id=49610

Differential revision: https://reviews.llvm.org/D104836




More information about the All-commits mailing list