summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM64
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-05-19 13:12:38 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-05-19 13:12:38 +0000
commitf3ad23551ddf178496892c0e42d6df380ec13c89 (patch)
treec5d11954de565bc87ff68df835d5f322c20ff295 /llvm/test/CodeGen/ARM64
parenta3afc69b949768a3aa01865132d9e5bf22a7fe2d (diff)
downloadbcm5719-llvm-f3ad23551ddf178496892c0e42d6df380ec13c89.tar.gz
bcm5719-llvm-f3ad23551ddf178496892c0e42d6df380ec13c89.zip
SDAG: Legalize vector BSWAP into a shuffle if the shuffle is legal but the bswap not.
- On ARM/ARM64 we get a vrev because the shuffle matching code is really smart. We still unroll anything that's not v4i32 though. - On X86 we get a pshufb with SSSE3. Required more cleverness in isShuffleMaskLegal. - On PPC we get a vperm for v8i16 and v4i32. v2i64 is unrolled. llvm-svn: 209123
Diffstat (limited to 'llvm/test/CodeGen/ARM64')
-rw-r--r--llvm/test/CodeGen/ARM64/rev.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM64/rev.ll b/llvm/test/CodeGen/ARM64/rev.ll
index 0006ea33175..1da59e42f6b 100644
--- a/llvm/test/CodeGen/ARM64/rev.ll
+++ b/llvm/test/CodeGen/ARM64/rev.ll
@@ -222,3 +222,14 @@ entry:
ret void
}
+
+define <4 x i32> @test_vrev32_bswap(<4 x i32> %source) nounwind {
+; CHECK-LABEL: test_vrev32_bswap:
+; CHECK: rev32.16b
+; CHECK-NOT: rev
+; CHECK: ret
+ %bswap = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %source)
+ ret <4 x i32> %bswap
+}
+
+declare <4 x i32> @llvm.bswap.v4i32(<4 x i32>) nounwind readnone
OpenPOWER on IntegriCloud