| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py |
| 2 |
// REQUIRES: aarch64-registered-target |
| 3 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s |
| 4 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK |
| 5 |
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s |
| 6 |
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK |
| 7 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s |
| 8 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s |
| 9 |
|
| 10 |
#include <arm_sve.h> |
| 11 |
|
| 12 |
#if defined __ARM_FEATURE_SME |
| 13 |
#define MODE_ATTR __arm_streaming |
| 14 |
#else |
| 15 |
#define MODE_ATTR |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifdef SVE_OVERLOADED_FORMS |
| 19 |
// A simple used,unused... macro, long enough to represent any SVE builtin. |
| 20 |
#define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 |
| 21 |
#else |
| 22 |
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4 |
| 23 |
#endif |
| 24 |
|
| 25 |
// CHECK-LABEL: @test_svprfb( |
| 26 |
// CHECK-NEXT: entry: |
| 27 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 0) |
| 28 |
// CHECK-NEXT: ret void |
| 29 |
// |
| 30 |
// CPP-CHECK-LABEL: @_Z11test_svprfbu10__SVBool_tPKv( |
| 31 |
// CPP-CHECK-NEXT: entry: |
| 32 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 0) |
| 33 |
// CPP-CHECK-NEXT: ret void |
| 34 |
// |
| 35 |
void test_svprfb(svbool_t pg, const void *base) MODE_ATTR |
| 36 |
{ |
| 37 |
return svprfb(pg, base, SV_PLDL1KEEP); |
| 38 |
} |
| 39 |
|
| 40 |
// CHECK-LABEL: @test_svprfb_1( |
| 41 |
// CHECK-NEXT: entry: |
| 42 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 1) |
| 43 |
// CHECK-NEXT: ret void |
| 44 |
// |
| 45 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_1u10__SVBool_tPKv( |
| 46 |
// CPP-CHECK-NEXT: entry: |
| 47 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 1) |
| 48 |
// CPP-CHECK-NEXT: ret void |
| 49 |
// |
| 50 |
void test_svprfb_1(svbool_t pg, const void *base) MODE_ATTR |
| 51 |
{ |
| 52 |
return svprfb(pg, base, SV_PLDL1STRM); |
| 53 |
} |
| 54 |
|
| 55 |
// CHECK-LABEL: @test_svprfb_2( |
| 56 |
// CHECK-NEXT: entry: |
| 57 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 2) |
| 58 |
// CHECK-NEXT: ret void |
| 59 |
// |
| 60 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_2u10__SVBool_tPKv( |
| 61 |
// CPP-CHECK-NEXT: entry: |
| 62 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 2) |
| 63 |
// CPP-CHECK-NEXT: ret void |
| 64 |
// |
| 65 |
void test_svprfb_2(svbool_t pg, const void *base) MODE_ATTR |
| 66 |
{ |
| 67 |
return svprfb(pg, base, SV_PLDL2KEEP); |
| 68 |
} |
| 69 |
|
| 70 |
// CHECK-LABEL: @test_svprfb_3( |
| 71 |
// CHECK-NEXT: entry: |
| 72 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 3) |
| 73 |
// CHECK-NEXT: ret void |
| 74 |
// |
| 75 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_3u10__SVBool_tPKv( |
| 76 |
// CPP-CHECK-NEXT: entry: |
| 77 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 3) |
| 78 |
// CPP-CHECK-NEXT: ret void |
| 79 |
// |
| 80 |
void test_svprfb_3(svbool_t pg, const void *base) MODE_ATTR |
| 81 |
{ |
| 82 |
return svprfb(pg, base, SV_PLDL2STRM); |
| 83 |
} |
| 84 |
|
| 85 |
// CHECK-LABEL: @test_svprfb_4( |
| 86 |
// CHECK-NEXT: entry: |
| 87 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 4) |
| 88 |
// CHECK-NEXT: ret void |
| 89 |
// |
| 90 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_4u10__SVBool_tPKv( |
| 91 |
// CPP-CHECK-NEXT: entry: |
| 92 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 4) |
| 93 |
// CPP-CHECK-NEXT: ret void |
| 94 |
// |
| 95 |
void test_svprfb_4(svbool_t pg, const void *base) MODE_ATTR |
| 96 |
{ |
| 97 |
return svprfb(pg, base, SV_PLDL3KEEP); |
| 98 |
} |
| 99 |
|
| 100 |
// CHECK-LABEL: @test_svprfb_5( |
| 101 |
// CHECK-NEXT: entry: |
| 102 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 5) |
| 103 |
// CHECK-NEXT: ret void |
| 104 |
// |
| 105 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_5u10__SVBool_tPKv( |
| 106 |
// CPP-CHECK-NEXT: entry: |
| 107 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 5) |
| 108 |
// CPP-CHECK-NEXT: ret void |
| 109 |
// |
| 110 |
void test_svprfb_5(svbool_t pg, const void *base) MODE_ATTR |
| 111 |
{ |
| 112 |
return svprfb(pg, base, SV_PLDL3STRM); |
| 113 |
} |
| 114 |
|
| 115 |
// CHECK-LABEL: @test_svprfb_6( |
| 116 |
// CHECK-NEXT: entry: |
| 117 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 8) |
| 118 |
// CHECK-NEXT: ret void |
| 119 |
// |
| 120 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_6u10__SVBool_tPKv( |
| 121 |
// CPP-CHECK-NEXT: entry: |
| 122 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 8) |
| 123 |
// CPP-CHECK-NEXT: ret void |
| 124 |
// |
| 125 |
void test_svprfb_6(svbool_t pg, const void *base) MODE_ATTR |
| 126 |
{ |
| 127 |
return svprfb(pg, base, SV_PSTL1KEEP); |
| 128 |
} |
| 129 |
|
| 130 |
// CHECK-LABEL: @test_svprfb_7( |
| 131 |
// CHECK-NEXT: entry: |
| 132 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 9) |
| 133 |
// CHECK-NEXT: ret void |
| 134 |
// |
| 135 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_7u10__SVBool_tPKv( |
| 136 |
// CPP-CHECK-NEXT: entry: |
| 137 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 9) |
| 138 |
// CPP-CHECK-NEXT: ret void |
| 139 |
// |
| 140 |
void test_svprfb_7(svbool_t pg, const void *base) MODE_ATTR |
| 141 |
{ |
| 142 |
return svprfb(pg, base, SV_PSTL1STRM); |
| 143 |
} |
| 144 |
|
| 145 |
// CHECK-LABEL: @test_svprfb_8( |
| 146 |
// CHECK-NEXT: entry: |
| 147 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 10) |
| 148 |
// CHECK-NEXT: ret void |
| 149 |
// |
| 150 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_8u10__SVBool_tPKv( |
| 151 |
// CPP-CHECK-NEXT: entry: |
| 152 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 10) |
| 153 |
// CPP-CHECK-NEXT: ret void |
| 154 |
// |
| 155 |
void test_svprfb_8(svbool_t pg, const void *base) MODE_ATTR |
| 156 |
{ |
| 157 |
return svprfb(pg, base, SV_PSTL2KEEP); |
| 158 |
} |
| 159 |
|
| 160 |
// CHECK-LABEL: @test_svprfb_9( |
| 161 |
// CHECK-NEXT: entry: |
| 162 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 11) |
| 163 |
// CHECK-NEXT: ret void |
| 164 |
// |
| 165 |
// CPP-CHECK-LABEL: @_Z13test_svprfb_9u10__SVBool_tPKv( |
| 166 |
// CPP-CHECK-NEXT: entry: |
| 167 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 11) |
| 168 |
// CPP-CHECK-NEXT: ret void |
| 169 |
// |
| 170 |
void test_svprfb_9(svbool_t pg, const void *base) MODE_ATTR |
| 171 |
{ |
| 172 |
return svprfb(pg, base, SV_PSTL2STRM); |
| 173 |
} |
| 174 |
|
| 175 |
// CHECK-LABEL: @test_svprfb_10( |
| 176 |
// CHECK-NEXT: entry: |
| 177 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 12) |
| 178 |
// CHECK-NEXT: ret void |
| 179 |
// |
| 180 |
// CPP-CHECK-LABEL: @_Z14test_svprfb_10u10__SVBool_tPKv( |
| 181 |
// CPP-CHECK-NEXT: entry: |
| 182 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 12) |
| 183 |
// CPP-CHECK-NEXT: ret void |
| 184 |
// |
| 185 |
void test_svprfb_10(svbool_t pg, const void *base) MODE_ATTR |
| 186 |
{ |
| 187 |
return svprfb(pg, base, SV_PSTL3KEEP); |
| 188 |
} |
| 189 |
|
| 190 |
// CHECK-LABEL: @test_svprfb_11( |
| 191 |
// CHECK-NEXT: entry: |
| 192 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 13) |
| 193 |
// CHECK-NEXT: ret void |
| 194 |
// |
| 195 |
// CPP-CHECK-LABEL: @_Z14test_svprfb_11u10__SVBool_tPKv( |
| 196 |
// CPP-CHECK-NEXT: entry: |
| 197 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[BASE:%.*]], i32 13) |
| 198 |
// CPP-CHECK-NEXT: ret void |
| 199 |
// |
| 200 |
void test_svprfb_11(svbool_t pg, const void *base) MODE_ATTR |
| 201 |
{ |
| 202 |
return svprfb(pg, base, SV_PSTL3STRM); |
| 203 |
} |
| 204 |
|
| 205 |
// CHECK-LABEL: @test_svprfb_vnum( |
| 206 |
// CHECK-NEXT: entry: |
| 207 |
// CHECK-NEXT: [[TMP0:%.*]] = getelementptr <vscale x 16 x i8>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]] |
| 208 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[TMP0]], i32 0) |
| 209 |
// CHECK-NEXT: ret void |
| 210 |
// |
| 211 |
// CPP-CHECK-LABEL: @_Z16test_svprfb_vnumu10__SVBool_tPKvl( |
| 212 |
// CPP-CHECK-NEXT: entry: |
| 213 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = getelementptr <vscale x 16 x i8>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]] |
| 214 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], ptr [[TMP0]], i32 0) |
| 215 |
// CPP-CHECK-NEXT: ret void |
| 216 |
// |
| 217 |
void test_svprfb_vnum(svbool_t pg, const void *base, int64_t vnum) MODE_ATTR |
| 218 |
{ |
| 219 |
return svprfb_vnum(pg, base, vnum, SV_PLDL1KEEP); |
| 220 |
} |
| 221 |
|
| 222 |
#ifndef __ARM_FEATURE_SME |
| 223 |
|
| 224 |
// CHECK-LABEL: @test_svprfb_gather_u32base( |
| 225 |
// CHECK-NEXT: entry: |
| 226 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 227 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 0, i32 0) |
| 228 |
// CHECK-NEXT: ret void |
| 229 |
// |
| 230 |
// CPP-CHECK-LABEL: @_Z26test_svprfb_gather_u32baseu10__SVBool_tu12__SVUint32_t( |
| 231 |
// CPP-CHECK-NEXT: entry: |
| 232 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 233 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 0, i32 0) |
| 234 |
// CPP-CHECK-NEXT: ret void |
| 235 |
// |
| 236 |
void test_svprfb_gather_u32base(svbool_t pg, svuint32_t bases) |
| 237 |
{ |
| 238 |
return SVE_ACLE_FUNC(svprfb_gather,_u32base,,)(pg, bases, SV_PLDL1KEEP); |
| 239 |
} |
| 240 |
|
| 241 |
// CHECK-LABEL: @test_svprfb_gather_u64base( |
| 242 |
// CHECK-NEXT: entry: |
| 243 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 244 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 0, i32 0) |
| 245 |
// CHECK-NEXT: ret void |
| 246 |
// |
| 247 |
// CPP-CHECK-LABEL: @_Z26test_svprfb_gather_u64baseu10__SVBool_tu12__SVUint64_t( |
| 248 |
// CPP-CHECK-NEXT: entry: |
| 249 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 250 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 0, i32 0) |
| 251 |
// CPP-CHECK-NEXT: ret void |
| 252 |
// |
| 253 |
void test_svprfb_gather_u64base(svbool_t pg, svuint64_t bases) |
| 254 |
{ |
| 255 |
return SVE_ACLE_FUNC(svprfb_gather,_u64base,,)(pg, bases, SV_PLDL1KEEP); |
| 256 |
} |
| 257 |
|
| 258 |
// CHECK-LABEL: @test_svprfb_gather_s32offset( |
| 259 |
// CHECK-NEXT: entry: |
| 260 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 261 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.sxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[OFFSETS:%.*]], i32 0) |
| 262 |
// CHECK-NEXT: ret void |
| 263 |
// |
| 264 |
// CPP-CHECK-LABEL: @_Z28test_svprfb_gather_s32offsetu10__SVBool_tPKvu11__SVInt32_t( |
| 265 |
// CPP-CHECK-NEXT: entry: |
| 266 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 267 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.sxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[OFFSETS:%.*]], i32 0) |
| 268 |
// CPP-CHECK-NEXT: ret void |
| 269 |
// |
| 270 |
void test_svprfb_gather_s32offset(svbool_t pg, const void *base, svint32_t offsets) |
| 271 |
{ |
| 272 |
return SVE_ACLE_FUNC(svprfb_gather_,s32,offset,)(pg, base, offsets, SV_PLDL1KEEP); |
| 273 |
} |
| 274 |
|
| 275 |
// CHECK-LABEL: @test_svprfb_gather_s64offset( |
| 276 |
// CHECK-NEXT: entry: |
| 277 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 278 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[OFFSETS:%.*]], i32 0) |
| 279 |
// CHECK-NEXT: ret void |
| 280 |
// |
| 281 |
// CPP-CHECK-LABEL: @_Z28test_svprfb_gather_s64offsetu10__SVBool_tPKvu11__SVInt64_t( |
| 282 |
// CPP-CHECK-NEXT: entry: |
| 283 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 284 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[OFFSETS:%.*]], i32 0) |
| 285 |
// CPP-CHECK-NEXT: ret void |
| 286 |
// |
| 287 |
void test_svprfb_gather_s64offset(svbool_t pg, const void *base, svint64_t offsets) |
| 288 |
{ |
| 289 |
return SVE_ACLE_FUNC(svprfb_gather_,s64,offset,)(pg, base, offsets, SV_PLDL1KEEP); |
| 290 |
} |
| 291 |
|
| 292 |
// CHECK-LABEL: @test_svprfb_gather_u32offset( |
| 293 |
// CHECK-NEXT: entry: |
| 294 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 295 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.uxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[OFFSETS:%.*]], i32 0) |
| 296 |
// CHECK-NEXT: ret void |
| 297 |
// |
| 298 |
// CPP-CHECK-LABEL: @_Z28test_svprfb_gather_u32offsetu10__SVBool_tPKvu12__SVUint32_t( |
| 299 |
// CPP-CHECK-NEXT: entry: |
| 300 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 301 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.uxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[OFFSETS:%.*]], i32 0) |
| 302 |
// CPP-CHECK-NEXT: ret void |
| 303 |
// |
| 304 |
void test_svprfb_gather_u32offset(svbool_t pg, const void *base, svuint32_t offsets) |
| 305 |
{ |
| 306 |
return SVE_ACLE_FUNC(svprfb_gather_,u32,offset,)(pg, base, offsets, SV_PLDL1KEEP); |
| 307 |
} |
| 308 |
|
| 309 |
// CHECK-LABEL: @test_svprfb_gather_u64offset( |
| 310 |
// CHECK-NEXT: entry: |
| 311 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 312 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[OFFSETS:%.*]], i32 0) |
| 313 |
// CHECK-NEXT: ret void |
| 314 |
// |
| 315 |
// CPP-CHECK-LABEL: @_Z28test_svprfb_gather_u64offsetu10__SVBool_tPKvu12__SVUint64_t( |
| 316 |
// CPP-CHECK-NEXT: entry: |
| 317 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 318 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[OFFSETS:%.*]], i32 0) |
| 319 |
// CPP-CHECK-NEXT: ret void |
| 320 |
// |
| 321 |
void test_svprfb_gather_u64offset(svbool_t pg, const void *base, svuint64_t offsets) |
| 322 |
{ |
| 323 |
return SVE_ACLE_FUNC(svprfb_gather_,u64,offset,)(pg, base, offsets, SV_PLDL1KEEP); |
| 324 |
} |
| 325 |
|
| 326 |
// CHECK-LABEL: @test_svprfb_gather_u32base_offset( |
| 327 |
// CHECK-NEXT: entry: |
| 328 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 329 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 [[OFFSET:%.*]], i32 0) |
| 330 |
// CHECK-NEXT: ret void |
| 331 |
// |
| 332 |
// CPP-CHECK-LABEL: @_Z33test_svprfb_gather_u32base_offsetu10__SVBool_tu12__SVUint32_tl( |
| 333 |
// CPP-CHECK-NEXT: entry: |
| 334 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 335 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 [[OFFSET:%.*]], i32 0) |
| 336 |
// CPP-CHECK-NEXT: ret void |
| 337 |
// |
| 338 |
void test_svprfb_gather_u32base_offset(svbool_t pg, svuint32_t bases, int64_t offset) |
| 339 |
{ |
| 340 |
return svprfb_gather_u32base_offset(pg, bases, offset, SV_PLDL1KEEP); |
| 341 |
return SVE_ACLE_FUNC(svprfb_gather,_u32base,_offset,)(pg, bases, offset, SV_PLDL1KEEP); |
| 342 |
} |
| 343 |
|
| 344 |
// CHECK-LABEL: @test_svprfb_gather_u64base_offset( |
| 345 |
// CHECK-NEXT: entry: |
| 346 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 347 |
// CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 [[OFFSET:%.*]], i32 0) |
| 348 |
// CHECK-NEXT: ret void |
| 349 |
// |
| 350 |
// CPP-CHECK-LABEL: @_Z33test_svprfb_gather_u64base_offsetu10__SVBool_tu12__SVUint64_tl( |
| 351 |
// CPP-CHECK-NEXT: entry: |
| 352 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]]) |
| 353 |
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfb.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 [[OFFSET:%.*]], i32 0) |
| 354 |
// CPP-CHECK-NEXT: ret void |
| 355 |
// |
| 356 |
void test_svprfb_gather_u64base_offset(svbool_t pg, svuint64_t bases, int64_t offset) |
| 357 |
{ |
| 358 |
return SVE_ACLE_FUNC(svprfb_gather,_u64base,_offset,)(pg, bases, offset, SV_PLDL1KEEP); |
| 359 |
} |
| 360 |
|
| 361 |
#endif |