diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-05-19 13:12:38 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-05-19 13:12:38 +0000 |
commit | bb81d9d5fae81ce2a032d632c7268818ff97a864 (patch) | |
tree | d1cac95ebe746dc3639a76a756f1b48d1afec473 /test/CodeGen/ARM | |
parent | 306cd28e214a7913e5f0fec865e0857609e164b3 (diff) | |
download | llvm-bb81d9d5fae81ce2a032d632c7268818ff97a864.tar.gz llvm-bb81d9d5fae81ce2a032d632c7268818ff97a864.tar.bz2 llvm-bb81d9d5fae81ce2a032d632c7268818ff97a864.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
-rw-r--r-- | test/CodeGen/ARM/vrev.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/vrev.ll b/test/CodeGen/ARM/vrev.ll index eb76ba6ea0..7215ad615e 100644 --- a/test/CodeGen/ARM/vrev.ll +++ b/test/CodeGen/ARM/vrev.ll @@ -178,3 +178,11 @@ entry: ret void } +define <4 x i32> @test_vrev32_bswap(<4 x i32> %source) nounwind { +; CHECK-LABEL: test_vrev32_bswap: +; CHECK: vrev32.8 + %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 |