1 ; RUN: llc -mtriple=arm-eabi -mattr=+neon < %s | FileCheck %s
2 ; RUN: llc -mtriple=arm-eabi -mattr=+neon -opaque-pointers < %s | FileCheck %s
4 %struct.__neon_int32x2x2_t = type { <2 x i32>, <2 x i32> }
5 %struct.__neon_int32x2x3_t = type { <2 x i32>, <2 x i32>, <2 x i32> }
6 %struct.__neon_int32x2x4_t = type { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> }
8 ; vld[1234] auto-upgrade tests
10 ; CHECK-LABEL: test_vld1_upgrade:
11 ; CHECK: vld1.32 {d16}, [r0]
12 define <2 x i32> @test_vld1_upgrade(i8* %ptr) {
13 %tmp1 = call <2 x i32> @llvm.arm.neon.vld1.v2i32(i8* %ptr, i32 1)
17 declare <2 x i32> @llvm.arm.neon.vld1.v2i32(i8*, i32) nounwind readonly
19 ; CHECK-LABEL: test_vld2_upgrade:
20 ; CHECK: vld2.32 {d16, d17}, [r0]
21 define %struct.__neon_int32x2x2_t @test_vld2_upgrade(i8* %ptr) {
22 %tmp1 = call %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2.v2i32(i8* %ptr, i32 1)
23 ret %struct.__neon_int32x2x2_t %tmp1
26 declare %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2.v2i32(i8*, i32) nounwind readonly
28 ; CHECK-LABEL: test_vld3_upgrade:
29 ; CHECK: vld3.32 {d16, d17, d18}, [r1]
30 define %struct.__neon_int32x2x3_t @test_vld3_upgrade(i8* %ptr) {
31 %tmp1 = call %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(i8* %ptr, i32 1)
32 ret %struct.__neon_int32x2x3_t %tmp1
35 declare %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(i8*, i32) nounwind readonly
37 ; CHECK-LABEL: test_vld4_upgrade:
38 ; CHECK: vld4.32 {d16, d17, d18, d19}, [r1]
39 define %struct.__neon_int32x2x4_t @test_vld4_upgrade(i8* %ptr) {
40 %tmp1 = call %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4.v2i32(i8* %ptr, i32 1)
41 ret %struct.__neon_int32x2x4_t %tmp1
44 declare %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4.v2i32(i8*, i32) nounwind readonly
46 ; vld[234]lane auto-upgrade tests
48 ; CHECK-LABEL: test_vld2lane_upgrade:
49 ; CHECK: vld2.32 {d16[1], d17[1]}, [r0]
50 define %struct.__neon_int32x2x2_t @test_vld2lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B) {
51 %tmp1 = call %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2lane.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, i32 1, i32 1)
52 ret %struct.__neon_int32x2x2_t %tmp1
55 declare %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2lane.v2i32(i8*, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly
57 ; CHECK-LABEL: test_vld3lane_upgrade:
58 ; CHECK: vld3.32 {d16[1], d17[1], d18[1]}, [r1]
59 define %struct.__neon_int32x2x3_t @test_vld3lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) {
60 %tmp1 = call %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3lane.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1, i32 1)
61 ret %struct.__neon_int32x2x3_t %tmp1
64 declare %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3lane.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly
66 ; CHECK-LABEL: test_vld4lane_upgrade:
67 ; CHECK: vld4.32 {d16[1], d17[1], d18[1], d19[1]}, [r1]
68 define %struct.__neon_int32x2x4_t @test_vld4lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D) {
69 %tmp1 = call %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4lane.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1, i32 1)
70 ret %struct.__neon_int32x2x4_t %tmp1
73 declare %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4lane.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly
75 ; vst[1234] auto-upgrade tests
77 ; CHECK-LABEL: test_vst1_upgrade:
78 ; CHECK: vst1.32 {d16}, [r0]
79 define void @test_vst1_upgrade(i8* %ptr, <2 x i32> %A) {
80 call void @llvm.arm.neon.vst1.v2i32(i8* %ptr, <2 x i32> %A, i32 1)
84 declare void @llvm.arm.neon.vst1.v2i32(i8*, <2 x i32>, i32) nounwind
86 ; CHECK-LABEL: test_vst2_upgrade:
87 ; CHECK: vst2.32 {d16, d17}, [r0]
88 define void @test_vst2_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B) {
89 call void @llvm.arm.neon.vst2.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, i32 1)
93 declare void @llvm.arm.neon.vst2.v2i32(i8*, <2 x i32>, <2 x i32>, i32) nounwind
95 ; CHECK-LABEL: test_vst3_upgrade:
96 ; CHECK: vst3.32 {d16, d17, d18}, [r0]
97 define void @test_vst3_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) {
98 call void @llvm.arm.neon.vst3.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1)
102 declare void @llvm.arm.neon.vst3.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, i32) nounwind
104 ; CHECK-LABEL: test_vst4_upgrade:
105 ; CHECK: vst4.32 {d16, d17, d18, d19}, [r0]
106 define void @test_vst4_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D) {
107 call void @llvm.arm.neon.vst4.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1)
111 declare void @llvm.arm.neon.vst4.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32) nounwind
113 ; vst[234]lane auto-upgrade tests
115 ; CHECK-LABEL: test_vst2lane_upgrade:
116 ; CHECK: vst2.32 {d16[1], d17[1]}, [r0]
117 define void @test_vst2lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B) {
118 call void @llvm.arm.neon.vst2lane.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, i32 1, i32 1)
122 declare void @llvm.arm.neon.vst2lane.v2i32(i8*, <2 x i32>, <2 x i32>, i32, i32) nounwind
124 ; CHECK-LABEL: test_vst3lane_upgrade:
125 ; CHECK: vst3.32 {d16[1], d17[1], d18[1]}, [r0]
126 define void @test_vst3lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) {
127 call void @llvm.arm.neon.vst3lane.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1, i32 1)
131 declare void @llvm.arm.neon.vst3lane.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind
133 ; CHECK-LABEL: test_vst4lane_upgrade:
134 ; CHECK: vst4.32 {d16[1], d17[1], d18[1], d19[1]}, [r0]
135 define void @test_vst4lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D) {
136 call void @llvm.arm.neon.vst4lane.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1, i32 1)
140 declare void @llvm.arm.neon.vst4lane.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind