OSDN Git Service

[GlobalISel][AArch64] Select llvm.bswap* for non-vector types
authorJessica Paquette <jpaquette@apple.com>
Tue, 12 Feb 2019 17:28:17 +0000 (17:28 +0000)
committerJessica Paquette <jpaquette@apple.com>
Tue, 12 Feb 2019 17:28:17 +0000 (17:28 +0000)
commitd1ae68f0324b7f1b2d7a9cabcb954bce427cb64a
tree03ffbb47120aa6034d4f74a8ca8a36f8c7c477a2
parent1fcc05880eb106562929885857f55f558dc2a36e
[GlobalISel][AArch64] Select llvm.bswap* for non-vector types

This teaches the IRTranslator to emit G_BSWAP when it runs into
Intrinsic::bswap. This allows us to select G_BSWAP for non-vector types in
AArch64.

Add a select-bswap.mir test, and add global isel checks to a couple existing
tests in test/CodeGen/AArch64.

This doesn't handle every bswap case, since some of these rely on known bits
stuff. This just lets us handle the naive case.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353861 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/IRTranslator.cpp
lib/Target/AArch64/select-bswap.mir [new file with mode: 0644]
test/CodeGen/AArch64/arm64-rev.ll
test/CodeGen/AArch64/dp1.ll