Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 2 | // Test ARM64 SIMD load and stores of an N-element structure intrinsics |
| 3 | |
| 4 | #include <arm_neon.h> |
| 5 | |
| 6 | int64x2x2_t test_vld2q_lane_s64(const void * a1, int64x2x2_t a2) { |
| 7 | // CHECK: test_vld2q_lane_s64 |
| 8 | return vld2q_lane_s64(a1, a2, 1); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 9 | // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 10 | } |
| 11 | |
| 12 | uint64x2x2_t test_vld2q_lane_u64(const void * a1, uint64x2x2_t a2) { |
| 13 | // CHECK: test_vld2q_lane_u64 |
| 14 | return vld2q_lane_u64(a1, a2, 1); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 15 | // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | int64x1x2_t test_vld2_lane_s64(const void * a1, int64x1x2_t a2) { |
| 19 | // CHECK: test_vld2_lane_s64 |
| 20 | return vld2_lane_s64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 21 | // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | uint64x1x2_t test_vld2_lane_u64(const void * a1, uint64x1x2_t a2) { |
| 25 | // CHECK: test_vld2_lane_u64 |
| 26 | return vld2_lane_u64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 27 | // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | poly8x16x2_t test_vld2q_lane_p8(const void * a1, poly8x16x2_t a2) { |
| 31 | // CHECK: test_vld2q_lane_p8 |
| 32 | return vld2q_lane_p8(a1, a2, 0); |
| 33 | // CHECK: extractvalue {{.*}} 0{{ *$}} |
| 34 | // CHECK: extractvalue {{.*}} 1{{ *$}} |
| 35 | } |
| 36 | |
| 37 | uint8x16x2_t test_vld2q_lane_u8(const void * a1, uint8x16x2_t a2) { |
| 38 | // CHECK: test_vld2q_lane_u8 |
| 39 | return vld2q_lane_u8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 40 | // CHECK: llvm.aarch64.neon.ld2lane.v16i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | int64x2x3_t test_vld3q_lane_s64(const void * a1, int64x2x3_t a2) { |
| 44 | // CHECK: test_vld3q_lane_s64 |
| 45 | return vld3q_lane_s64(a1, a2, 1); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 46 | // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | uint64x2x3_t test_vld3q_lane_u64(const void * a1, uint64x2x3_t a2) { |
| 50 | // CHECK: test_vld3q_lane_u64 |
| 51 | return vld3q_lane_u64(a1, a2, 1); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 52 | // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | int64x1x3_t test_vld3_lane_s64(const void * a1, int64x1x3_t a2) { |
| 56 | // CHECK: test_vld3_lane_s64 |
| 57 | return vld3_lane_s64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 58 | // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | uint64x1x3_t test_vld3_lane_u64(const void * a1, uint64x1x3_t a2) { |
| 62 | // CHECK: test_vld3_lane_u64 |
| 63 | return vld3_lane_u64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 64 | // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | int8x8x3_t test_vld3_lane_s8(const void * a1, int8x8x3_t a2) { |
| 68 | // CHECK: test_vld3_lane_s8 |
| 69 | return vld3_lane_s8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 70 | // CHECK: llvm.aarch64.neon.ld3lane.v8i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | poly8x16x3_t test_vld3q_lane_p8(const void * a1, poly8x16x3_t a2) { |
| 74 | // CHECK: test_vld3q_lane_p8 |
| 75 | return vld3q_lane_p8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 76 | // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | uint8x16x3_t test_vld3q_lane_u8(const void * a1, uint8x16x3_t a2) { |
| 80 | // CHECK: test_vld3q_lane_u8 |
| 81 | return vld3q_lane_u8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 82 | // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | int64x2x4_t test_vld4q_lane_s64(const void * a1, int64x2x4_t a2) { |
| 86 | // CHECK: test_vld4q_lane_s64 |
| 87 | return vld4q_lane_s64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 88 | // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | uint64x2x4_t test_vld4q_lane_u64(const void * a1, uint64x2x4_t a2) { |
| 92 | // CHECK: test_vld4q_lane_u64 |
| 93 | return vld4q_lane_u64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 94 | // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | int64x1x4_t test_vld4_lane_s64(const void * a1, int64x1x4_t a2) { |
| 98 | // CHECK: test_vld4_lane_s64 |
| 99 | return vld4_lane_s64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 100 | // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 101 | } |
| 102 | |
| 103 | uint64x1x4_t test_vld4_lane_u64(const void * a1, uint64x1x4_t a2) { |
| 104 | // CHECK: test_vld4_lane_u64 |
| 105 | return vld4_lane_u64(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 106 | // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | int8x8x4_t test_vld4_lane_s8(const void * a1, int8x8x4_t a2) { |
| 110 | // CHECK: test_vld4_lane_s8 |
| 111 | return vld4_lane_s8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 112 | // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | uint8x8x4_t test_vld4_lane_u8(const void * a1, uint8x8x4_t a2) { |
| 116 | // CHECK: test_vld4_lane_u8 |
| 117 | return vld4_lane_u8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 118 | // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | poly8x16x4_t test_vld4q_lane_p8(const void * a1, poly8x16x4_t a2) { |
| 122 | // CHECK: test_vld4q_lane_p8 |
| 123 | return vld4q_lane_p8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 124 | // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 125 | } |
| 126 | |
| 127 | int8x16x4_t test_vld4q_lane_s8(const void * a1, int8x16x4_t a2) { |
| 128 | // CHECK: test_vld4q_lane_s8 |
| 129 | return vld4q_lane_s8(a1, a2, 0); |
| 130 | // CHECK: extractvalue {{.*}} 0{{ *$}} |
| 131 | // CHECK: extractvalue {{.*}} 1{{ *$}} |
| 132 | // CHECK: extractvalue {{.*}} 2{{ *$}} |
| 133 | // CHECK: extractvalue {{.*}} 3{{ *$}} |
| 134 | } |
| 135 | |
| 136 | uint8x16x4_t test_vld4q_lane_u8(const void * a1, uint8x16x4_t a2) { |
| 137 | // CHECK: test_vld4q_lane_u8 |
| 138 | return vld4q_lane_u8(a1, a2, 0); |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 139 | // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 140 | } |
| 141 | |