[PowerPC] Fix bswap combine for big endian systems
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 24 Jun 2021 23:03:06 +0000 (18:03 -0500)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 24 Jun 2021 23:04:50 +0000 (18:04 -0500)
commitdcccb2f59401f309d75b9d80afed443464c50d9d
tree3b28ba6ed9b0b479f84fb48b47cde033ccbdd17c
parent744146f60bbf74872039871dee771d18f69bff89
[PowerPC] Fix bswap combine for big endian systems

Commit 0464586ac515e8cfebe4c7615387fd625c8869f5 added a combine
for a 64-bit load feeding a bswap but the implementation is only
correct for little endian systems.
This fixes it for big endian systems.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/bswap-load-store.ll
llvm/test/CodeGen/PowerPC/ld-bswap64-no-ldbrx.ll