1 ; RUN: llc -mtriple=arm-eabi -mattr=+neon < %s | FileCheck %s
3 %struct.__neon_int32x2x2_t = type { <2 x i32>, <2 x i32> }
4 %struct.__neon_int32x2x3_t = type { <2 x i32>, <2 x i32>, <2 x i32> }
5 %struct.__neon_int32x2x4_t = type { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> }
7 ; vld[1234] auto-upgrade tests
9 ; CHECK-LABEL: test_vld1_upgrade:
10 ; CHECK: vld1.32 {d16}, [r0]
11 define <2 x i32> @test_vld1_upgrade(ptr %ptr) {
12 %tmp1 = call <2 x i32> @llvm.arm.neon.vld1.v2i32(ptr %ptr, i32 1)
16 declare <2 x i32> @llvm.arm.neon.vld1.v2i32(ptr, i32) nounwind readonly
18 ; CHECK-LABEL: test_vld2_upgrade:
19 ; CHECK: vld2.32 {d16, d17}, [r0]
20 define %struct.__neon_int32x2x2_t @test_vld2_upgrade(ptr %ptr) {
21 %tmp1 = call %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2.v2i32(ptr %ptr, i32 1)
22 ret %struct.__neon_int32x2x2_t %tmp1
25 declare %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2.v2i32(ptr, i32) nounwind readonly
27 ; CHECK-LABEL: test_vld3_upgrade:
28 ; CHECK: vld3.32 {d16, d17, d18}, [r1]
29 define %struct.__neon_int32x2x3_t @test_vld3_upgrade(ptr %ptr) {
30 %tmp1 = call %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(ptr %ptr, i32 1)
31 ret %struct.__neon_int32x2x3_t %tmp1
34 declare %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(ptr, i32) nounwind readonly
36 ; CHECK-LABEL: test_vld4_upgrade:
37 ; CHECK: vld4.32 {d16, d17, d18, d19}, [r1]
38 define %struct.__neon_int32x2x4_t @test_vld4_upgrade(ptr %ptr) {
39 %tmp1 = call %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4.v2i32(ptr %ptr, i32 1)
40 ret %struct.__neon_int32x2x4_t %tmp1
43 declare %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4.v2i32(ptr, i32) nounwind readonly
45 ; vld[234]lane auto-upgrade tests
47 ; CHECK-LABEL: test_vld2lane_upgrade:
48 ; CHECK: vld2.32 {d16[1], d17[1]}, [r0]
49 define %struct.__neon_int32x2x2_t @test_vld2lane_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B) {
50 %tmp1 = call %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2lane.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, i32 1, i32 1)
51 ret %struct.__neon_int32x2x2_t %tmp1
54 declare %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2lane.v2i32(ptr, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly
56 ; CHECK-LABEL: test_vld3lane_upgrade:
57 ; CHECK: vld3.32 {d16[1], d17[1], d18[1]}, [r1]
58 define %struct.__neon_int32x2x3_t @test_vld3lane_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) {
59 %tmp1 = call %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3lane.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1, i32 1)
60 ret %struct.__neon_int32x2x3_t %tmp1
63 declare %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3lane.v2i32(ptr, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly
65 ; CHECK-LABEL: test_vld4lane_upgrade:
66 ; CHECK: vld4.32 {d16[1], d17[1], d18[1], d19[1]}, [r1]
67 define %struct.__neon_int32x2x4_t @test_vld4lane_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D) {
68 %tmp1 = call %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4lane.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1, i32 1)
69 ret %struct.__neon_int32x2x4_t %tmp1
72 declare %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4lane.v2i32(ptr, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly
74 ; vst[1234] auto-upgrade tests
76 ; CHECK-LABEL: test_vst1_upgrade:
77 ; CHECK: vst1.32 {d16}, [r0]
78 define void @test_vst1_upgrade(ptr %ptr, <2 x i32> %A) {
79 call void @llvm.arm.neon.vst1.v2i32(ptr %ptr, <2 x i32> %A, i32 1)
83 declare void @llvm.arm.neon.vst1.v2i32(ptr, <2 x i32>, i32) nounwind
85 ; CHECK-LABEL: test_vst2_upgrade:
86 ; CHECK: vst2.32 {d16, d17}, [r0]
87 define void @test_vst2_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B) {
88 call void @llvm.arm.neon.vst2.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, i32 1)
92 declare void @llvm.arm.neon.vst2.v2i32(ptr, <2 x i32>, <2 x i32>, i32) nounwind
94 ; CHECK-LABEL: test_vst3_upgrade:
95 ; CHECK: vst3.32 {d16, d17, d18}, [r0]
96 define void @test_vst3_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) {
97 call void @llvm.arm.neon.vst3.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1)
101 declare void @llvm.arm.neon.vst3.v2i32(ptr, <2 x i32>, <2 x i32>, <2 x i32>, i32) nounwind
103 ; CHECK-LABEL: test_vst4_upgrade:
104 ; CHECK: vst4.32 {d16, d17, d18, d19}, [r0]
105 define void @test_vst4_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D) {
106 call void @llvm.arm.neon.vst4.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1)
110 declare void @llvm.arm.neon.vst4.v2i32(ptr, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32) nounwind
112 ; vst[234]lane auto-upgrade tests
114 ; CHECK-LABEL: test_vst2lane_upgrade:
115 ; CHECK: vst2.32 {d16[1], d17[1]}, [r0]
116 define void @test_vst2lane_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B) {
117 call void @llvm.arm.neon.vst2lane.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, i32 1, i32 1)
121 declare void @llvm.arm.neon.vst2lane.v2i32(ptr, <2 x i32>, <2 x i32>, i32, i32) nounwind
123 ; CHECK-LABEL: test_vst3lane_upgrade:
124 ; CHECK: vst3.32 {d16[1], d17[1], d18[1]}, [r0]
125 define void @test_vst3lane_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) {
126 call void @llvm.arm.neon.vst3lane.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1, i32 1)
130 declare void @llvm.arm.neon.vst3lane.v2i32(ptr, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind
132 ; CHECK-LABEL: test_vst4lane_upgrade:
133 ; CHECK: vst4.32 {d16[1], d17[1], d18[1], d19[1]}, [r0]
134 define void @test_vst4lane_upgrade(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D) {
135 call void @llvm.arm.neon.vst4lane.v2i32(ptr %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1, i32 1)
139 declare void @llvm.arm.neon.vst4lane.v2i32(ptr, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind