diff options
| author | Raul E. Silvera <rsilvera@google.com> | 2014-03-18 17:49:12 +0000 |
|---|---|---|
| committer | Raul E. Silvera <rsilvera@google.com> | 2014-03-18 17:49:12 +0000 |
| commit | a9dafe679319112d26c1d2edb1bb26952c2983db (patch) | |
| tree | 505eaf9425f7c0ae3392b00650692bbe74ec57c2 /llvm/test | |
| parent | d486b343a0175606bf9fcf8c52de21ec982b169a (diff) | |
| download | bcm5719-llvm-a9dafe679319112d26c1d2edb1bb26952c2983db.tar.gz bcm5719-llvm-a9dafe679319112d26c1d2edb1bb26952c2983db.zip | |
Add support for scalarizing/splitting vector bswap.
Summary:
SLP Vectorization of intrinsics (r203707) has exposed cases where the
expansion of vector bswap is failing (PR19151).
Reviewers: hfinkel
CC: chandlerc
Differential Revision: http://llvm-reviews.chandlerc.com/D3104
llvm-svn: 204163
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/Mips/bswap.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/bswap.ll b/llvm/test/CodeGen/Mips/bswap.ll index 4824388da10..22b3db41a63 100644 --- a/llvm/test/CodeGen/Mips/bswap.ll +++ b/llvm/test/CodeGen/Mips/bswap.ll @@ -22,7 +22,26 @@ entry: ret i64 %or.7 } +define <4 x i32> @bswapv4i32(<4 x i32> %x) nounwind readnone { +entry: +; MIPS32-LABEL: bswapv4i32: +; MIPS32: wsbh $[[R0:[0-9]+]] +; MIPS32: rotr ${{[0-9]+}}, $[[R0]], 16 +; MIPS32: wsbh $[[R0:[0-9]+]] +; MIPS32: rotr ${{[0-9]+}}, $[[R0]], 16 +; MIPS32: wsbh $[[R0:[0-9]+]] +; MIPS32: rotr ${{[0-9]+}}, $[[R0]], 16 +; MIPS32: wsbh $[[R0:[0-9]+]] +; MIPS32: rotr ${{[0-9]+}}, $[[R0]], 16 +; mips16: .ent bswapv4i32 + %ret = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %x) + ret <4 x i32> %ret +} + + + declare i32 @llvm.bswap.i32(i32) nounwind readnone declare i64 @llvm.bswap.i64(i64) nounwind readnone +declare <4 x i32> @llvm.bswap.v4i32(<4 x i32>) nounwind readnone |

