| 1 |
/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */ |
| 2 |
|
| 3 |
#include "test_sve_acle.h" |
| 4 |
|
| 5 |
/* |
| 6 |
** cdot_lane_0_0_s64_tied1: |
| 7 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #0 |
| 8 |
** ret |
| 9 |
*/ |
| 10 |
TEST_DUAL_Z (cdot_lane_0_0_s64_tied1, svint64_t, svint16_t, |
| 11 |
z0 = svcdot_lane_s64 (z0, z4, z5, 0, 0), |
| 12 |
z0 = svcdot_lane (z0, z4, z5, 0, 0)) |
| 13 |
|
| 14 |
/* |
| 15 |
** cdot_lane_0_0_s64_tied2: |
| 16 |
** mov (z[0-9]+)\.d, z0\.d |
| 17 |
** movprfx z0, z4 |
| 18 |
** cdot z0\.d, \1\.h, z1\.h\[0\], #0 |
| 19 |
** ret |
| 20 |
*/ |
| 21 |
TEST_DUAL_Z_REV (cdot_lane_0_0_s64_tied2, svint64_t, svint16_t, |
| 22 |
z0_res = svcdot_lane_s64 (z4, z0, z1, 0, 0), |
| 23 |
z0_res = svcdot_lane (z4, z0, z1, 0, 0)) |
| 24 |
|
| 25 |
/* |
| 26 |
** cdot_lane_0_0_s64_tied3: |
| 27 |
** mov (z[0-9]+)\.d, z0\.d |
| 28 |
** movprfx z0, z4 |
| 29 |
** cdot z0\.d, z1\.h, \1\.h\[0\], #0 |
| 30 |
** ret |
| 31 |
*/ |
| 32 |
TEST_DUAL_Z_REV (cdot_lane_0_0_s64_tied3, svint64_t, svint16_t, |
| 33 |
z0_res = svcdot_lane_s64 (z4, z1, z0, 0, 0), |
| 34 |
z0_res = svcdot_lane (z4, z1, z0, 0, 0)) |
| 35 |
|
| 36 |
/* |
| 37 |
** cdot_lane_0_0_s64_untied: |
| 38 |
** movprfx z0, z1 |
| 39 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #0 |
| 40 |
** ret |
| 41 |
*/ |
| 42 |
TEST_DUAL_Z (cdot_lane_0_0_s64_untied, svint64_t, svint16_t, |
| 43 |
z0 = svcdot_lane_s64 (z1, z4, z5, 0, 0), |
| 44 |
z0 = svcdot_lane (z1, z4, z5, 0, 0)) |
| 45 |
|
| 46 |
/* |
| 47 |
** cdot_lane_0_90_s64_tied1: |
| 48 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #90 |
| 49 |
** ret |
| 50 |
*/ |
| 51 |
TEST_DUAL_Z (cdot_lane_0_90_s64_tied1, svint64_t, svint16_t, |
| 52 |
z0 = svcdot_lane_s64 (z0, z4, z5, 0, 90), |
| 53 |
z0 = svcdot_lane (z0, z4, z5, 0, 90)) |
| 54 |
|
| 55 |
/* |
| 56 |
** cdot_lane_0_90_s64_tied2: |
| 57 |
** mov (z[0-9]+)\.d, z0\.d |
| 58 |
** movprfx z0, z4 |
| 59 |
** cdot z0\.d, \1\.h, z1\.h\[0\], #90 |
| 60 |
** ret |
| 61 |
*/ |
| 62 |
TEST_DUAL_Z_REV (cdot_lane_0_90_s64_tied2, svint64_t, svint16_t, |
| 63 |
z0_res = svcdot_lane_s64 (z4, z0, z1, 0, 90), |
| 64 |
z0_res = svcdot_lane (z4, z0, z1, 0, 90)) |
| 65 |
|
| 66 |
/* |
| 67 |
** cdot_lane_0_90_s64_tied3: |
| 68 |
** mov (z[0-9]+)\.d, z0\.d |
| 69 |
** movprfx z0, z4 |
| 70 |
** cdot z0\.d, z1\.h, \1\.h\[0\], #90 |
| 71 |
** ret |
| 72 |
*/ |
| 73 |
TEST_DUAL_Z_REV (cdot_lane_0_90_s64_tied3, svint64_t, svint16_t, |
| 74 |
z0_res = svcdot_lane_s64 (z4, z1, z0, 0, 90), |
| 75 |
z0_res = svcdot_lane (z4, z1, z0, 0, 90)) |
| 76 |
|
| 77 |
/* |
| 78 |
** cdot_lane_0_90_s64_untied: |
| 79 |
** movprfx z0, z1 |
| 80 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #90 |
| 81 |
** ret |
| 82 |
*/ |
| 83 |
TEST_DUAL_Z (cdot_lane_0_90_s64_untied, svint64_t, svint16_t, |
| 84 |
z0 = svcdot_lane_s64 (z1, z4, z5, 0, 90), |
| 85 |
z0 = svcdot_lane (z1, z4, z5, 0, 90)) |
| 86 |
|
| 87 |
/* |
| 88 |
** cdot_lane_0_180_s64_tied1: |
| 89 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #180 |
| 90 |
** ret |
| 91 |
*/ |
| 92 |
TEST_DUAL_Z (cdot_lane_0_180_s64_tied1, svint64_t, svint16_t, |
| 93 |
z0 = svcdot_lane_s64 (z0, z4, z5, 0, 180), |
| 94 |
z0 = svcdot_lane (z0, z4, z5, 0, 180)) |
| 95 |
|
| 96 |
/* |
| 97 |
** cdot_lane_0_180_s64_tied2: |
| 98 |
** mov (z[0-9]+)\.d, z0\.d |
| 99 |
** movprfx z0, z4 |
| 100 |
** cdot z0\.d, \1\.h, z1\.h\[0\], #180 |
| 101 |
** ret |
| 102 |
*/ |
| 103 |
TEST_DUAL_Z_REV (cdot_lane_0_180_s64_tied2, svint64_t, svint16_t, |
| 104 |
z0_res = svcdot_lane_s64 (z4, z0, z1, 0, 180), |
| 105 |
z0_res = svcdot_lane (z4, z0, z1, 0, 180)) |
| 106 |
|
| 107 |
/* |
| 108 |
** cdot_lane_0_180_s64_tied3: |
| 109 |
** mov (z[0-9]+)\.d, z0\.d |
| 110 |
** movprfx z0, z4 |
| 111 |
** cdot z0\.d, z1\.h, \1\.h\[0\], #180 |
| 112 |
** ret |
| 113 |
*/ |
| 114 |
TEST_DUAL_Z_REV (cdot_lane_0_180_s64_tied3, svint64_t, svint16_t, |
| 115 |
z0_res = svcdot_lane_s64 (z4, z1, z0, 0, 180), |
| 116 |
z0_res = svcdot_lane (z4, z1, z0, 0, 180)) |
| 117 |
|
| 118 |
/* |
| 119 |
** cdot_lane_0_180_s64_untied: |
| 120 |
** movprfx z0, z1 |
| 121 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #180 |
| 122 |
** ret |
| 123 |
*/ |
| 124 |
TEST_DUAL_Z (cdot_lane_0_180_s64_untied, svint64_t, svint16_t, |
| 125 |
z0 = svcdot_lane_s64 (z1, z4, z5, 0, 180), |
| 126 |
z0 = svcdot_lane (z1, z4, z5, 0, 180)) |
| 127 |
|
| 128 |
/* |
| 129 |
** cdot_lane_0_270_s64_tied1: |
| 130 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #270 |
| 131 |
** ret |
| 132 |
*/ |
| 133 |
TEST_DUAL_Z (cdot_lane_0_270_s64_tied1, svint64_t, svint16_t, |
| 134 |
z0 = svcdot_lane_s64 (z0, z4, z5, 0, 270), |
| 135 |
z0 = svcdot_lane (z0, z4, z5, 0, 270)) |
| 136 |
|
| 137 |
/* |
| 138 |
** cdot_lane_0_270_s64_tied2: |
| 139 |
** mov (z[0-9]+)\.d, z0\.d |
| 140 |
** movprfx z0, z4 |
| 141 |
** cdot z0\.d, \1\.h, z1\.h\[0\], #270 |
| 142 |
** ret |
| 143 |
*/ |
| 144 |
TEST_DUAL_Z_REV (cdot_lane_0_270_s64_tied2, svint64_t, svint16_t, |
| 145 |
z0_res = svcdot_lane_s64 (z4, z0, z1, 0, 270), |
| 146 |
z0_res = svcdot_lane (z4, z0, z1, 0, 270)) |
| 147 |
|
| 148 |
/* |
| 149 |
** cdot_lane_0_270_s64_tied3: |
| 150 |
** mov (z[0-9]+)\.d, z0\.d |
| 151 |
** movprfx z0, z4 |
| 152 |
** cdot z0\.d, z1\.h, \1\.h\[0\], #270 |
| 153 |
** ret |
| 154 |
*/ |
| 155 |
TEST_DUAL_Z_REV (cdot_lane_0_270_s64_tied3, svint64_t, svint16_t, |
| 156 |
z0_res = svcdot_lane_s64 (z4, z1, z0, 0, 270), |
| 157 |
z0_res = svcdot_lane (z4, z1, z0, 0, 270)) |
| 158 |
|
| 159 |
/* |
| 160 |
** cdot_lane_0_270_s64_untied: |
| 161 |
** movprfx z0, z1 |
| 162 |
** cdot z0\.d, z4\.h, z5\.h\[0\], #270 |
| 163 |
** ret |
| 164 |
*/ |
| 165 |
TEST_DUAL_Z (cdot_lane_0_270_s64_untied, svint64_t, svint16_t, |
| 166 |
z0 = svcdot_lane_s64 (z1, z4, z5, 0, 270), |
| 167 |
z0 = svcdot_lane (z1, z4, z5, 0, 270)) |
| 168 |
|
| 169 |
/* |
| 170 |
** cdot_lane_z15_s64: |
| 171 |
** str d15, \[sp, -16\]! |
| 172 |
** cdot z0\.d, z1\.h, z15\.h\[1\], #0 |
| 173 |
** ldr d15, \[sp\], 16 |
| 174 |
** ret |
| 175 |
*/ |
| 176 |
TEST_DUAL_LANE_REG (cdot_lane_z15_s64, svint64_t, svint16_t, z15, |
| 177 |
z0 = svcdot_lane_s64 (z0, z1, z15, 1, 0), |
| 178 |
z0 = svcdot_lane (z0, z1, z15, 1, 0)) |
| 179 |
|
| 180 |
/* |
| 181 |
** cdot_lane_z16_s64: |
| 182 |
** mov (z[0-9]|z1[0-5])\.d, z16\.d |
| 183 |
** cdot z0\.d, z1\.h, \1\.h\[1\], #0 |
| 184 |
** ret |
| 185 |
*/ |
| 186 |
TEST_DUAL_LANE_REG (cdot_lane_z16_s64, svint64_t, svint16_t, z16, |
| 187 |
z0 = svcdot_lane_s64 (z0, z1, z16, 1, 0), |
| 188 |
z0 = svcdot_lane (z0, z1, z16, 1, 0)) |