1 ; RUN: llc -mtriple=arm-eabi -mattr=+neon < %s | FileCheck %s 2 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> } 6 7 ; vld[1234] auto-upgrade tests 8 9 ; CHECK-LABEL: test_vld1_upgrade: 10 ; CHECK: vld1.32 {d16}, [r0] 11 define <2 x i32> @test_vld1_upgrade(i8* %ptr) { 12 %tmp1 = call <2 x i32> @llvm.arm.neon.vld1.v2i32(i8* %ptr, i32 1) 13 ret <2 x i32> %tmp1 14 } 15 16 declare <2 x i32> @llvm.arm.neon.vld1.v2i32(i8*, i32) nounwind readonly 17 18 ; CHECK-LABEL: test_vld2_upgrade: 19 ; CHECK: vld2.32 {d16, d17}, [r0] 20 define %struct.__neon_int32x2x2_t @test_vld2_upgrade(i8* %ptr) { 21 %tmp1 = call %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2.v2i32(i8* %ptr, i32 1) 22 ret %struct.__neon_int32x2x2_t %tmp1 23 } 24 25 declare %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2.v2i32(i8*, i32) nounwind readonly 26 27 ; CHECK-LABEL: test_vld3_upgrade: 28 ; CHECK: vld3.32 {d16, d17, d18}, [r1] 29 define %struct.__neon_int32x2x3_t @test_vld3_upgrade(i8* %ptr) { 30 %tmp1 = call %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(i8* %ptr, i32 1) 31 ret %struct.__neon_int32x2x3_t %tmp1 32 } 33 34 declare %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(i8*, i32) nounwind readonly 35 36 ; CHECK-LABEL: test_vld4_upgrade: 37 ; CHECK: vld4.32 {d16, d17, d18, d19}, [r1] 38 define %struct.__neon_int32x2x4_t @test_vld4_upgrade(i8* %ptr) { 39 %tmp1 = call %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4.v2i32(i8* %ptr, i32 1) 40 ret %struct.__neon_int32x2x4_t %tmp1 41 } 42 43 declare %struct.__neon_int32x2x4_t @llvm.arm.neon.vld4.v2i32(i8*, i32) nounwind readonly 44 45 ; vld[234]lane auto-upgrade tests 46 47 ; CHECK-LABEL: test_vld2lane_upgrade: 48 ; CHECK: vld2.32 {d16[1], d17[1]}, [r0] 49 define %struct.__neon_int32x2x2_t @test_vld2lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B) { 50 %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) 51 ret %struct.__neon_int32x2x2_t %tmp1 52 } 53 54 declare %struct.__neon_int32x2x2_t @llvm.arm.neon.vld2lane.v2i32(i8*, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly 55 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(i8* %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(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1, i32 1) 60 ret %struct.__neon_int32x2x3_t %tmp1 61 } 62 63 declare %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3lane.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind readonly 64 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(i8* %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(i8* %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 70 } 71 72 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 73 74 ; vst[1234] auto-upgrade tests 75 76 ; CHECK-LABEL: test_vst1_upgrade: 77 ; CHECK: vst1.32 {d16}, [r0] 78 define void @test_vst1_upgrade(i8* %ptr, <2 x i32> %A) { 79 call void @llvm.arm.neon.vst1.v2i32(i8* %ptr, <2 x i32> %A, i32 1) 80 ret void 81 } 82 83 declare void @llvm.arm.neon.vst1.v2i32(i8*, <2 x i32>, i32) nounwind 84 85 ; CHECK-LABEL: test_vst2_upgrade: 86 ; CHECK: vst2.32 {d16, d17}, [r0] 87 define void @test_vst2_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B) { 88 call void @llvm.arm.neon.vst2.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, i32 1) 89 ret void 90 } 91 92 declare void @llvm.arm.neon.vst2.v2i32(i8*, <2 x i32>, <2 x i32>, i32) nounwind 93 94 ; CHECK-LABEL: test_vst3_upgrade: 95 ; CHECK: vst3.32 {d16, d17, d18}, [r0] 96 define void @test_vst3_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) { 97 call void @llvm.arm.neon.vst3.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, i32 1) 98 ret void 99 } 100 101 declare void @llvm.arm.neon.vst3.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, i32) nounwind 102 103 ; CHECK-LABEL: test_vst4_upgrade: 104 ; CHECK: vst4.32 {d16, d17, d18, d19}, [r0] 105 define void @test_vst4_upgrade(i8* %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(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1) 107 ret void 108 } 109 110 declare void @llvm.arm.neon.vst4.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32) nounwind 111 112 ; vst[234]lane auto-upgrade tests 113 114 ; CHECK-LABEL: test_vst2lane_upgrade: 115 ; CHECK: vst2.32 {d16[1], d17[1]}, [r0] 116 define void @test_vst2lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B) { 117 call void @llvm.arm.neon.vst2lane.v2i32(i8* %ptr, <2 x i32> %A, <2 x i32> %B, i32 1, i32 1) 118 ret void 119 } 120 121 declare void @llvm.arm.neon.vst2lane.v2i32(i8*, <2 x i32>, <2 x i32>, i32, i32) nounwind 122 123 ; CHECK-LABEL: test_vst3lane_upgrade: 124 ; CHECK: vst3.32 {d16[1], d17[1], d18[1]}, [r0] 125 define void @test_vst3lane_upgrade(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C) { 126 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) 127 ret void 128 } 129 130 declare void @llvm.arm.neon.vst3lane.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind 131 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(i8* %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(i8* %ptr, <2 x i32> %A, <2 x i32> %B, <2 x i32> %C, <2 x i32> %D, i32 1, i32 1) 136 ret void 137 } 138 139 declare void @llvm.arm.neon.vst4lane.v2i32(i8*, <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, i32, i32) nounwind 140