blob: 578d80d1cef4653b931aa4b77ed86ecbf54ab211 [file] [log] [blame]
Christian Pirkerb5728192014-05-08 14:06:24 +00001; RUN: llc < %s -mtriple=thumbv7s-apple-ios3.0.0 -mcpu=generic | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-LE
Eric Christopher661f2d12014-12-18 02:20:58 +00002; RUN: llc < %s -mtriple=thumbeb -target-abi apcs -mattr=v7,neon | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-BE
Benjamin Kramerbbae9912013-04-09 17:41:43 +00003
4; PR15525
Stephen Linf799e3f2013-07-13 20:38:47 +00005; CHECK-LABEL: test1:
Benjamin Kramerbbae9912013-04-09 17:41:43 +00006; CHECK: ldr.w [[REG:r[0-9]+]], [sp]
Christian Pirkerb5728192014-05-08 14:06:24 +00007; CHECK-LE-NEXT: vmov {{d[0-9]+}}, r1, r2
8; CHECK-LE-NEXT: vmov {{d[0-9]+}}, r3, [[REG]]
9; CHECK-BE-NEXT: vmov {{d[0-9]+}}, r2, r1
Christian Pirker238c7c12014-05-12 11:19:20 +000010; CHECK-BE: vmov {{d[0-9]+}}, [[REG]], r3
11; CHECK: vst1.8 {{{d[0-9]+}}, {{d[0-9]+}}}, [r0]
Benjamin Kramerbbae9912013-04-09 17:41:43 +000012; CHECK-NEXT: bx lr
13define void @test1(i8* %arg, [4 x i64] %vec.coerce) {
14bb:
15 %tmp = extractvalue [4 x i64] %vec.coerce, 0
16 %tmp2 = bitcast i64 %tmp to <8 x i8>
17 %tmp3 = shufflevector <8 x i8> %tmp2, <8 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
18 %tmp4 = extractvalue [4 x i64] %vec.coerce, 1
19 %tmp5 = bitcast i64 %tmp4 to <8 x i8>
20 %tmp6 = shufflevector <8 x i8> %tmp5, <8 x i8> undef, <16 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
21 %tmp7 = shufflevector <16 x i8> %tmp6, <16 x i8> %tmp3, <16 x i32> <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
Jeroen Ketemaab99b592015-09-30 10:56:37 +000022 tail call void @llvm.arm.neon.vst1.p0i8.v16i8(i8* %arg, <16 x i8> %tmp7, i32 2)
Benjamin Kramerbbae9912013-04-09 17:41:43 +000023 ret void
24}
25
Jeroen Ketemaab99b592015-09-30 10:56:37 +000026declare void @llvm.arm.neon.vst1.p0i8.v16i8(i8*, <16 x i8>, i32)