| 1 |
//===- IntrinsicsHexagon.td - Defines Hexagon intrinsics ---*- tablegen -*-===// |
| 2 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 3 |
// See https://llvm.org/LICENSE.txt for license information. |
| 4 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 5 |
// |
| 6 |
//===----------------------------------------------------------------------===// |
| 7 |
// |
| 8 |
// This file defines all of the Hexagon-specific intrinsics. |
| 9 |
// |
| 10 |
//===----------------------------------------------------------------------===// |
| 11 |
|
| 12 |
//===----------------------------------------------------------------------===// |
| 13 |
// Definitions for all Hexagon intrinsics. |
| 14 |
// |
| 15 |
// All Hexagon intrinsics start with "llvm.hexagon.". |
| 16 |
let TargetPrefix = "hexagon" in { |
| 17 |
/// Hexagon_Intrinsic - Base class for the majority of Hexagon intrinsics. |
| 18 |
class Hexagon_Intrinsic<string GCCIntSuffix, list<LLVMType> ret_types, |
| 19 |
list<LLVMType> param_types, |
| 20 |
list<IntrinsicProperty> properties> |
| 21 |
: GCCBuiltin<!strconcat("__builtin_", GCCIntSuffix)>, |
| 22 |
Intrinsic<ret_types, param_types, properties>; |
| 23 |
|
| 24 |
/// Hexagon_NonGCC_Intrinsic - Base class for bitcode convertible Hexagon |
| 25 |
/// intrinsics. |
| 26 |
class Hexagon_NonGCC_Intrinsic<list<LLVMType> ret_types, |
| 27 |
list<LLVMType> param_types, |
| 28 |
list<IntrinsicProperty> properties> |
| 29 |
: Intrinsic<ret_types, param_types, properties>; |
| 30 |
} |
| 31 |
|
| 32 |
class Hexagon_mem_memmemsi_Intrinsic<string GCCIntSuffix> |
| 33 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 34 |
[llvm_ptr_ty], [llvm_ptr_ty, llvm_ptr_ty, |
| 35 |
llvm_i32_ty], |
| 36 |
[IntrArgMemOnly]>; |
| 37 |
|
| 38 |
class Hexagon_mem_memsisi_Intrinsic<string GCCIntSuffix> |
| 39 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 40 |
[llvm_ptr_ty], [llvm_ptr_ty, llvm_i32_ty, |
| 41 |
llvm_i32_ty], |
| 42 |
[IntrWriteMem]>; |
| 43 |
|
| 44 |
class Hexagon_mem_memdisi_Intrinsic<string GCCIntSuffix> |
| 45 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 46 |
[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty, |
| 47 |
llvm_i32_ty], |
| 48 |
[IntrWriteMem]>; |
| 49 |
|
| 50 |
class Hexagon_mem_memmemsisi_Intrinsic<string GCCIntSuffix> |
| 51 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 52 |
[llvm_ptr_ty], [llvm_ptr_ty, llvm_ptr_ty, |
| 53 |
llvm_i32_ty, llvm_i32_ty], |
| 54 |
[IntrArgMemOnly, ImmArg<ArgIndex<3>>]>; |
| 55 |
|
| 56 |
class Hexagon_mem_memsisisi_Intrinsic<string GCCIntSuffix> |
| 57 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 58 |
[llvm_ptr_ty], [llvm_ptr_ty, llvm_i32_ty, |
| 59 |
llvm_i32_ty, llvm_i32_ty], |
| 60 |
[IntrWriteMem, ImmArg<ArgIndex<3>>]>; |
| 61 |
|
| 62 |
class Hexagon_mem_memdisisi_Intrinsic<string GCCIntSuffix> |
| 63 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 64 |
[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty, |
| 65 |
llvm_i32_ty, llvm_i32_ty], |
| 66 |
[IntrWriteMem, ImmArg<ArgIndex<3>>]>; |
| 67 |
|
| 68 |
// |
| 69 |
// BUILTIN_INFO_NONCONST(circ_ldd,PTR_ftype_PTRPTRSISI,4) |
| 70 |
// |
| 71 |
def int_hexagon_circ_ldd : |
| 72 |
Hexagon_mem_memmemsisi_Intrinsic<"circ_ldd">; |
| 73 |
// |
| 74 |
// BUILTIN_INFO_NONCONST(circ_ldw,PTR_ftype_PTRPTRSISI,4) |
| 75 |
// |
| 76 |
def int_hexagon_circ_ldw : |
| 77 |
Hexagon_mem_memmemsisi_Intrinsic<"circ_ldw">; |
| 78 |
// |
| 79 |
// BUILTIN_INFO_NONCONST(circ_ldh,PTR_ftype_PTRPTRSISI,4) |
| 80 |
// |
| 81 |
def int_hexagon_circ_ldh : |
| 82 |
Hexagon_mem_memmemsisi_Intrinsic<"circ_ldh">; |
| 83 |
// |
| 84 |
// BUILTIN_INFO_NONCONST(circ_lduh,PTR_ftype_PTRPTRSISI,4) |
| 85 |
// |
| 86 |
def int_hexagon_circ_lduh : |
| 87 |
Hexagon_mem_memmemsisi_Intrinsic<"circ_lduh">; |
| 88 |
// |
| 89 |
// BUILTIN_INFO_NONCONST(circ_ldb,PTR_ftype_PTRPTRSISI,4) |
| 90 |
// |
| 91 |
def int_hexagon_circ_ldb : |
| 92 |
Hexagon_mem_memmemsisi_Intrinsic<"circ_ldb">; |
| 93 |
// |
| 94 |
// BUILTIN_INFO_NONCONST(circ_ldub,PTR_ftype_PTRPTRSISI,4) |
| 95 |
// |
| 96 |
def int_hexagon_circ_ldub : |
| 97 |
Hexagon_mem_memmemsisi_Intrinsic<"circ_ldub">; |
| 98 |
|
| 99 |
// |
| 100 |
// BUILTIN_INFO_NONCONST(circ_std,PTR_ftype_PTRDISISI,4) |
| 101 |
// |
| 102 |
def int_hexagon_circ_std : |
| 103 |
Hexagon_mem_memdisisi_Intrinsic<"circ_std">; |
| 104 |
// |
| 105 |
// BUILTIN_INFO_NONCONST(circ_stw,PTR_ftype_PTRSISISI,4) |
| 106 |
// |
| 107 |
def int_hexagon_circ_stw : |
| 108 |
Hexagon_mem_memsisisi_Intrinsic<"circ_stw">; |
| 109 |
// |
| 110 |
// BUILTIN_INFO_NONCONST(circ_sth,PTR_ftype_PTRSISISI,4) |
| 111 |
// |
| 112 |
def int_hexagon_circ_sth : |
| 113 |
Hexagon_mem_memsisisi_Intrinsic<"circ_sth">; |
| 114 |
// |
| 115 |
// BUILTIN_INFO_NONCONST(circ_sthhi,PTR_ftype_PTRSISISI,4) |
| 116 |
// |
| 117 |
def int_hexagon_circ_sthhi : |
| 118 |
Hexagon_mem_memsisisi_Intrinsic<"circ_sthhi">; |
| 119 |
// |
| 120 |
// BUILTIN_INFO_NONCONST(circ_stb,PTR_ftype_PTRSISISI,4) |
| 121 |
// |
| 122 |
def int_hexagon_circ_stb : |
| 123 |
Hexagon_mem_memsisisi_Intrinsic<"circ_stb">; |
| 124 |
|
| 125 |
def int_hexagon_prefetch : |
| 126 |
Hexagon_Intrinsic<"HEXAGON_prefetch", [], [llvm_ptr_ty], []>; |
| 127 |
|
| 128 |
def llvm_ptr32_ty : LLVMPointerType<llvm_i32_ty>; |
| 129 |
def llvm_ptr64_ty : LLVMPointerType<llvm_i64_ty>; |
| 130 |
|
| 131 |
// Mark locked loads as read/write to prevent any accidental reordering. |
| 132 |
def int_hexagon_L2_loadw_locked : |
| 133 |
Hexagon_Intrinsic<"HEXAGON_L2_loadw_locked", [llvm_i32_ty], [llvm_ptr32_ty], |
| 134 |
[IntrArgMemOnly, NoCapture<ArgIndex<0>>]>; |
| 135 |
def int_hexagon_L4_loadd_locked : |
| 136 |
Hexagon_Intrinsic<"HEXAGON_L4_loadd_locked", [llvm_i64_ty], [llvm_ptr64_ty], |
| 137 |
[IntrArgMemOnly, NoCapture<ArgIndex<0>>]>; |
| 138 |
|
| 139 |
def int_hexagon_S2_storew_locked : |
| 140 |
Hexagon_Intrinsic<"HEXAGON_S2_storew_locked", [llvm_i32_ty], |
| 141 |
[llvm_ptr32_ty, llvm_i32_ty], [IntrArgMemOnly, NoCapture<ArgIndex<0>>]>; |
| 142 |
def int_hexagon_S4_stored_locked : |
| 143 |
Hexagon_Intrinsic<"HEXAGON_S4_stored_locked", [llvm_i32_ty], |
| 144 |
[llvm_ptr64_ty, llvm_i64_ty], [IntrArgMemOnly, NoCapture<ArgIndex<0>>]>; |
| 145 |
|
| 146 |
def int_hexagon_vmemcpy : Hexagon_Intrinsic<"hexagon_vmemcpy", |
| 147 |
[], [llvm_ptr_ty, llvm_ptr_ty, llvm_i32_ty], |
| 148 |
[IntrArgMemOnly, NoCapture<ArgIndex<0>>, NoCapture<ArgIndex<1>>, WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>]>; |
| 149 |
|
| 150 |
def int_hexagon_vmemset : Hexagon_Intrinsic<"hexagon_vmemset", |
| 151 |
[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], |
| 152 |
[IntrArgMemOnly, NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>]>; |
| 153 |
|
| 154 |
multiclass Hexagon_custom_circ_ld_Intrinsic<LLVMType ElTy> { |
| 155 |
def NAME#_pci : Hexagon_NonGCC_Intrinsic< |
| 156 |
[ElTy, llvm_ptr_ty], |
| 157 |
[llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], |
| 158 |
[IntrArgMemOnly, NoCapture<ArgIndex<3>>]>; |
| 159 |
def NAME#_pcr : Hexagon_NonGCC_Intrinsic< |
| 160 |
[ElTy, llvm_ptr_ty], [llvm_ptr_ty, llvm_i32_ty, llvm_ptr_ty], |
| 161 |
[IntrArgMemOnly, NoCapture<ArgIndex<2>>]>; |
| 162 |
} |
| 163 |
|
| 164 |
defm int_hexagon_L2_loadrub : Hexagon_custom_circ_ld_Intrinsic<llvm_i32_ty>; |
| 165 |
defm int_hexagon_L2_loadrb : Hexagon_custom_circ_ld_Intrinsic<llvm_i32_ty>; |
| 166 |
defm int_hexagon_L2_loadruh : Hexagon_custom_circ_ld_Intrinsic<llvm_i32_ty>; |
| 167 |
defm int_hexagon_L2_loadrh : Hexagon_custom_circ_ld_Intrinsic<llvm_i32_ty>; |
| 168 |
defm int_hexagon_L2_loadri : Hexagon_custom_circ_ld_Intrinsic<llvm_i32_ty>; |
| 169 |
defm int_hexagon_L2_loadrd : Hexagon_custom_circ_ld_Intrinsic<llvm_i64_ty>; |
| 170 |
|
| 171 |
multiclass Hexagon_custom_circ_st_Intrinsic<LLVMType ElTy> { |
| 172 |
def NAME#_pci : Hexagon_NonGCC_Intrinsic< |
| 173 |
[llvm_ptr_ty], |
| 174 |
[llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty, ElTy, llvm_ptr_ty], |
| 175 |
[IntrArgMemOnly, NoCapture<ArgIndex<4>>]>; |
| 176 |
def NAME#_pcr : Hexagon_NonGCC_Intrinsic< |
| 177 |
[llvm_ptr_ty], [llvm_ptr_ty, llvm_i32_ty, ElTy, llvm_ptr_ty], |
| 178 |
[IntrArgMemOnly, NoCapture<ArgIndex<3>>]>; |
| 179 |
} |
| 180 |
|
| 181 |
defm int_hexagon_S2_storerb : Hexagon_custom_circ_st_Intrinsic<llvm_i32_ty>; |
| 182 |
defm int_hexagon_S2_storerh : Hexagon_custom_circ_st_Intrinsic<llvm_i32_ty>; |
| 183 |
defm int_hexagon_S2_storerf : Hexagon_custom_circ_st_Intrinsic<llvm_i32_ty>; |
| 184 |
defm int_hexagon_S2_storeri : Hexagon_custom_circ_st_Intrinsic<llvm_i32_ty>; |
| 185 |
defm int_hexagon_S2_storerd : Hexagon_custom_circ_st_Intrinsic<llvm_i64_ty>; |
| 186 |
|
| 187 |
// The front-end emits the intrinsic call with only two arguments. The third |
| 188 |
// argument from the builtin is already used by front-end to write to memory |
| 189 |
// by generating a store. |
| 190 |
class Hexagon_custom_brev_ld_Intrinsic<LLVMType ElTy> |
| 191 |
: Hexagon_NonGCC_Intrinsic< |
| 192 |
[ElTy, llvm_ptr_ty], [llvm_ptr_ty, llvm_i32_ty], |
| 193 |
[IntrReadMem]>; |
| 194 |
|
| 195 |
def int_hexagon_L2_loadrub_pbr : Hexagon_custom_brev_ld_Intrinsic<llvm_i32_ty>; |
| 196 |
def int_hexagon_L2_loadrb_pbr : Hexagon_custom_brev_ld_Intrinsic<llvm_i32_ty>; |
| 197 |
def int_hexagon_L2_loadruh_pbr : Hexagon_custom_brev_ld_Intrinsic<llvm_i32_ty>; |
| 198 |
def int_hexagon_L2_loadrh_pbr : Hexagon_custom_brev_ld_Intrinsic<llvm_i32_ty>; |
| 199 |
def int_hexagon_L2_loadri_pbr : Hexagon_custom_brev_ld_Intrinsic<llvm_i32_ty>; |
| 200 |
def int_hexagon_L2_loadrd_pbr : Hexagon_custom_brev_ld_Intrinsic<llvm_i64_ty>; |
| 201 |
|
| 202 |
def int_hexagon_S2_storerb_pbr : Hexagon_mem_memsisi_Intrinsic<"brev_stb">; |
| 203 |
def int_hexagon_S2_storerh_pbr : Hexagon_mem_memsisi_Intrinsic<"brev_sth">; |
| 204 |
def int_hexagon_S2_storerf_pbr : Hexagon_mem_memsisi_Intrinsic<"brev_sthhi">; |
| 205 |
def int_hexagon_S2_storeri_pbr : Hexagon_mem_memsisi_Intrinsic<"brev_stw">; |
| 206 |
def int_hexagon_S2_storerd_pbr : Hexagon_mem_memdisi_Intrinsic<"brev_std">; |
| 207 |
|
| 208 |
// tag : V6_vrmpybub_rtt |
| 209 |
class Hexagon_v32i32_v16i32i64_rtt_Intrinsic<string GCCIntSuffix> |
| 210 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 211 |
[llvm_v32i32_ty], [llvm_v16i32_ty,llvm_i64_ty], |
| 212 |
[IntrNoMem]>; |
| 213 |
|
| 214 |
// tag : V6_vrmpybub_rtt_128B |
| 215 |
class Hexagon_v64i32_v32i32i64_rtt_Intrinsic<string GCCIntSuffix> |
| 216 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 217 |
[llvm_v64i32_ty], [llvm_v32i32_ty,llvm_i64_ty], |
| 218 |
[IntrNoMem]>; |
| 219 |
|
| 220 |
// tag : V6_vrmpybub_rtt_acc |
| 221 |
class Hexagon_v32i32_v32i32v16i32i64_rtt_Intrinsic<string GCCIntSuffix> |
| 222 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 223 |
[llvm_v32i32_ty], [llvm_v32i32_ty,llvm_v16i32_ty,llvm_i64_ty], |
| 224 |
[IntrNoMem]>; |
| 225 |
|
| 226 |
// tag : V6_vrmpybub_rtt_acc_128B |
| 227 |
class Hexagon_v64i32_v64i32v32i32i64_rtt_Intrinsic<string GCCIntSuffix> |
| 228 |
: Hexagon_Intrinsic<GCCIntSuffix, |
| 229 |
[llvm_v64i32_ty], [llvm_v64i32_ty,llvm_v32i32_ty,llvm_i64_ty], |
| 230 |
[IntrNoMem]>; |
| 231 |
|
| 232 |
def int_hexagon_V6_vrmpybub_rtt : |
| 233 |
Hexagon_v32i32_v16i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpybub_rtt">; |
| 234 |
|
| 235 |
def int_hexagon_V6_vrmpybub_rtt_128B : |
| 236 |
Hexagon_v64i32_v32i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpybub_rtt_128B">; |
| 237 |
|
| 238 |
def int_hexagon_V6_vrmpybub_rtt_acc : |
| 239 |
Hexagon_v32i32_v32i32v16i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpybub_rtt_acc">; |
| 240 |
|
| 241 |
def int_hexagon_V6_vrmpybub_rtt_acc_128B : |
| 242 |
Hexagon_v64i32_v64i32v32i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpybub_rtt_acc_128B">; |
| 243 |
|
| 244 |
def int_hexagon_V6_vrmpyub_rtt : |
| 245 |
Hexagon_v32i32_v16i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpyub_rtt">; |
| 246 |
|
| 247 |
def int_hexagon_V6_vrmpyub_rtt_128B : |
| 248 |
Hexagon_v64i32_v32i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpyub_rtt_128B">; |
| 249 |
|
| 250 |
def int_hexagon_V6_vrmpyub_rtt_acc : |
| 251 |
Hexagon_v32i32_v32i32v16i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpyub_rtt_acc">; |
| 252 |
|
| 253 |
def int_hexagon_V6_vrmpyub_rtt_acc_128B : |
| 254 |
Hexagon_v64i32_v64i32v32i32i64_rtt_Intrinsic<"HEXAGON_V6_vrmpyub_rtt_acc_128B">; |
| 255 |
|
| 256 |
// HVX conditional loads/stores |
| 257 |
|
| 258 |
class Hexagon_pred_vload_imm<LLVMType ValTy> |
| 259 |
: Hexagon_NonGCC_Intrinsic< |
| 260 |
[ValTy], |
| 261 |
[llvm_i1_ty, LLVMPointerType<ValTy>, llvm_i32_ty], |
| 262 |
[IntrReadMem, IntrArgMemOnly, NoCapture<ArgIndex<1>>, |
| 263 |
ImmArg<ArgIndex<2>>]>; |
| 264 |
|
| 265 |
class Hexagon_pred_vload_imm_64B: Hexagon_pred_vload_imm<llvm_v16i32_ty>; |
| 266 |
class Hexagon_pred_vload_imm_128B: Hexagon_pred_vload_imm<llvm_v32i32_ty>; |
| 267 |
|
| 268 |
def int_hexagon_V6_vL32b_pred_ai: Hexagon_pred_vload_imm_64B; |
| 269 |
def int_hexagon_V6_vL32b_npred_ai: Hexagon_pred_vload_imm_64B; |
| 270 |
def int_hexagon_V6_vL32b_nt_pred_ai: Hexagon_pred_vload_imm_64B; |
| 271 |
def int_hexagon_V6_vL32b_nt_npred_ai: Hexagon_pred_vload_imm_64B; |
| 272 |
def int_hexagon_V6_vL32b_pred_ai_128B: Hexagon_pred_vload_imm_128B; |
| 273 |
def int_hexagon_V6_vL32b_npred_ai_128B: Hexagon_pred_vload_imm_128B; |
| 274 |
def int_hexagon_V6_vL32b_nt_pred_ai_128B: Hexagon_pred_vload_imm_128B; |
| 275 |
def int_hexagon_V6_vL32b_nt_npred_ai_128B: Hexagon_pred_vload_imm_128B; |
| 276 |
|
| 277 |
class Hexagom_pred_vload_upd<LLVMType ValTy, bit TakesImm> |
| 278 |
: Hexagon_NonGCC_Intrinsic< |
| 279 |
[ValTy, LLVMPointerType<ValTy>], |
| 280 |
[llvm_i1_ty, LLVMPointerType<ValTy>, llvm_i32_ty], |
| 281 |
!if(TakesImm, |
| 282 |
[IntrReadMem, IntrArgMemOnly, NoCapture<ArgIndex<1>>, |
| 283 |
ImmArg<ArgIndex<2>>], |
| 284 |
[IntrReadMem, IntrArgMemOnly, NoCapture<ArgIndex<1>>])>; |
| 285 |
|
| 286 |
class Hexagom_pred_vload_upd_64B<bit TakesImm> |
| 287 |
: Hexagom_pred_vload_upd<llvm_v16i32_ty, TakesImm>; |
| 288 |
class Hexagom_pred_vload_upd_128B<bit TakesImm> |
| 289 |
: Hexagom_pred_vload_upd<llvm_v32i32_ty, TakesImm>; |
| 290 |
|
| 291 |
def int_hexagon_V6_vL32b_pred_pi: Hexagom_pred_vload_upd_64B<1>; |
| 292 |
def int_hexagon_V6_vL32b_npred_pi: Hexagom_pred_vload_upd_64B<1>; |
| 293 |
def int_hexagon_V6_vL32b_nt_pred_pi: Hexagom_pred_vload_upd_64B<1>; |
| 294 |
def int_hexagon_V6_vL32b_nt_npred_pi: Hexagom_pred_vload_upd_64B<1>; |
| 295 |
def int_hexagon_V6_vL32b_pred_pi_128B: Hexagom_pred_vload_upd_128B<1>; |
| 296 |
def int_hexagon_V6_vL32b_npred_pi_128B: Hexagom_pred_vload_upd_128B<1>; |
| 297 |
def int_hexagon_V6_vL32b_nt_pred_pi_128B: Hexagom_pred_vload_upd_128B<1>; |
| 298 |
def int_hexagon_V6_vL32b_nt_npred_pi_128B: Hexagom_pred_vload_upd_128B<1>; |
| 299 |
|
| 300 |
def int_hexagon_V6_vL32b_pred_ppu: Hexagom_pred_vload_upd_64B<0>; |
| 301 |
def int_hexagon_V6_vL32b_npred_ppu: Hexagom_pred_vload_upd_64B<0>; |
| 302 |
def int_hexagon_V6_vL32b_nt_pred_ppu: Hexagom_pred_vload_upd_64B<0>; |
| 303 |
def int_hexagon_V6_vL32b_nt_npred_ppu: Hexagom_pred_vload_upd_64B<0>; |
| 304 |
def int_hexagon_V6_vL32b_pred_ppu_128B: Hexagom_pred_vload_upd_128B<0>; |
| 305 |
def int_hexagon_V6_vL32b_npred_ppu_128B: Hexagom_pred_vload_upd_128B<0>; |
| 306 |
def int_hexagon_V6_vL32b_nt_pred_ppu_128B: Hexagom_pred_vload_upd_128B<0>; |
| 307 |
def int_hexagon_V6_vL32b_nt_npred_ppu_128B: Hexagom_pred_vload_upd_128B<0>; |
| 308 |
|
| 309 |
|
| 310 |
class Hexagon_pred_vstore_imm<LLVMType ValTy> |
| 311 |
: Hexagon_NonGCC_Intrinsic< |
| 312 |
[], |
| 313 |
[llvm_i1_ty, LLVMPointerType<ValTy>, llvm_i32_ty, ValTy], |
| 314 |
[IntrWriteMem, IntrArgMemOnly, NoCapture<ArgIndex<1>>, |
| 315 |
ImmArg<ArgIndex<2>>]>; |
| 316 |
|
| 317 |
class Hexagon_pred_vstore_imm_64B: Hexagon_pred_vstore_imm<llvm_v16i32_ty>; |
| 318 |
class Hexagon_pred_vstore_imm_128B: Hexagon_pred_vstore_imm<llvm_v32i32_ty>; |
| 319 |
|
| 320 |
def int_hexagon_V6_vS32b_pred_ai: Hexagon_pred_vstore_imm_64B; |
| 321 |
def int_hexagon_V6_vS32b_npred_ai: Hexagon_pred_vstore_imm_64B; |
| 322 |
def int_hexagon_V6_vS32Ub_pred_ai: Hexagon_pred_vstore_imm_64B; |
| 323 |
def int_hexagon_V6_vS32Ub_npred_ai: Hexagon_pred_vstore_imm_64B; |
| 324 |
def int_hexagon_V6_vS32b_nt_pred_ai: Hexagon_pred_vstore_imm_64B; |
| 325 |
def int_hexagon_V6_vS32b_nt_npred_ai: Hexagon_pred_vstore_imm_64B; |
| 326 |
def int_hexagon_V6_vS32b_pred_ai_128B: Hexagon_pred_vstore_imm_128B; |
| 327 |
def int_hexagon_V6_vS32b_npred_ai_128B: Hexagon_pred_vstore_imm_128B; |
| 328 |
def int_hexagon_V6_vS32Ub_pred_ai_128B: Hexagon_pred_vstore_imm_128B; |
| 329 |
def int_hexagon_V6_vS32Ub_npred_ai_128B: Hexagon_pred_vstore_imm_128B; |
| 330 |
def int_hexagon_V6_vS32b_nt_pred_ai_128B: Hexagon_pred_vstore_imm_128B; |
| 331 |
def int_hexagon_V6_vS32b_nt_npred_ai_128B: Hexagon_pred_vstore_imm_128B; |
| 332 |
|
| 333 |
class Hexagon_pred_vstore_upd<LLVMType ValTy, bit TakesImm> |
| 334 |
: Hexagon_NonGCC_Intrinsic< |
| 335 |
[LLVMPointerType<ValTy>], |
| 336 |
[llvm_i1_ty, LLVMPointerType<ValTy>, llvm_i32_ty, ValTy], |
| 337 |
!if(TakesImm, |
| 338 |
[IntrWriteMem, IntrArgMemOnly, NoCapture<ArgIndex<1>>, |
| 339 |
ImmArg<ArgIndex<2>>], |
| 340 |
[IntrWriteMem, IntrArgMemOnly, NoCapture<ArgIndex<1>>])>; |
| 341 |
|
| 342 |
class Hexagon_pred_vstore_upd_64B<bit TakesImm> |
| 343 |
: Hexagon_pred_vstore_upd<llvm_v16i32_ty, TakesImm>; |
| 344 |
class Hexagon_pred_vstore_upd_128B<bit TakesImm> |
| 345 |
: Hexagon_pred_vstore_upd<llvm_v32i32_ty, TakesImm>; |
| 346 |
|
| 347 |
def int_hexagon_V6_vS32b_pred_pi: Hexagon_pred_vstore_upd_64B<1>; |
| 348 |
def int_hexagon_V6_vS32b_npred_pi: Hexagon_pred_vstore_upd_64B<1>; |
| 349 |
def int_hexagon_V6_vS32Ub_pred_pi: Hexagon_pred_vstore_upd_64B<1>; |
| 350 |
def int_hexagon_V6_vS32Ub_npred_pi: Hexagon_pred_vstore_upd_64B<1>; |
| 351 |
def int_hexagon_V6_vS32b_nt_pred_pi: Hexagon_pred_vstore_upd_64B<1>; |
| 352 |
def int_hexagon_V6_vS32b_nt_npred_pi: Hexagon_pred_vstore_upd_64B<1>; |
| 353 |
def int_hexagon_V6_vS32b_pred_pi_128B: Hexagon_pred_vstore_upd_128B<1>; |
| 354 |
def int_hexagon_V6_vS32b_npred_pi_128B: Hexagon_pred_vstore_upd_128B<1>; |
| 355 |
def int_hexagon_V6_vS32Ub_pred_pi_128B: Hexagon_pred_vstore_upd_128B<1>; |
| 356 |
def int_hexagon_V6_vS32Ub_npred_pi_128B: Hexagon_pred_vstore_upd_128B<1>; |
| 357 |
def int_hexagon_V6_vS32b_nt_pred_pi_128B: Hexagon_pred_vstore_upd_128B<1>; |
| 358 |
def int_hexagon_V6_vS32b_nt_npred_pi_128B: Hexagon_pred_vstore_upd_128B<1>; |
| 359 |
|
| 360 |
def int_hexagon_V6_vS32b_pred_ppu: Hexagon_pred_vstore_upd_64B<0>; |
| 361 |
def int_hexagon_V6_vS32b_npred_ppu: Hexagon_pred_vstore_upd_64B<0>; |
| 362 |
def int_hexagon_V6_vS32Ub_pred_ppu: Hexagon_pred_vstore_upd_64B<0>; |
| 363 |
def int_hexagon_V6_vS32Ub_npred_ppu: Hexagon_pred_vstore_upd_64B<0>; |
| 364 |
def int_hexagon_V6_vS32b_nt_pred_ppu: Hexagon_pred_vstore_upd_64B<0>; |
| 365 |
def int_hexagon_V6_vS32b_nt_npred_ppu: Hexagon_pred_vstore_upd_64B<0>; |
| 366 |
def int_hexagon_V6_vS32b_pred_ppu_128B: Hexagon_pred_vstore_upd_128B<0>; |
| 367 |
def int_hexagon_V6_vS32b_npred_ppu_128B: Hexagon_pred_vstore_upd_128B<0>; |
| 368 |
def int_hexagon_V6_vS32Ub_pred_ppu_128B: Hexagon_pred_vstore_upd_128B<0>; |
| 369 |
def int_hexagon_V6_vS32Ub_npred_ppu_128B: Hexagon_pred_vstore_upd_128B<0>; |
| 370 |
def int_hexagon_V6_vS32b_nt_pred_ppu_128B: Hexagon_pred_vstore_upd_128B<0>; |
| 371 |
def int_hexagon_V6_vS32b_nt_npred_ppu_128B: Hexagon_pred_vstore_upd_128B<0>; |
| 372 |
|
| 373 |
|
| 374 |
// HVX Vector predicate casts. |
| 375 |
// These intrinsics do not emit (nor do they correspond to) any instructions, |
| 376 |
// they are no-ops. |
| 377 |
|
| 378 |
def int_hexagon_V6_pred_typecast : |
| 379 |
Hexagon_NonGCC_Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty], [IntrNoMem]>; |
| 380 |
|
| 381 |
def int_hexagon_V6_pred_typecast_128B : |
| 382 |
Hexagon_NonGCC_Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty], [IntrNoMem]>; |
| 383 |
|
| 384 |
// Masked vector stores |
| 385 |
// |
| 386 |
// These are all deprecated, the intrinsics matching instruction names |
| 387 |
// should be used instead, e.g. int_hexagon_V6_vS32b_qpred_ai, etc. |
| 388 |
|
| 389 |
class Hexagon_custom_vms_Intrinsic |
| 390 |
: Hexagon_NonGCC_Intrinsic< |
| 391 |
[], [llvm_v64i1_ty,llvm_ptr_ty,llvm_v16i32_ty], [IntrWriteMem]>; |
| 392 |
|
| 393 |
class Hexagon_custom_vms_Intrinsic_128B |
| 394 |
: Hexagon_NonGCC_Intrinsic< |
| 395 |
[], [llvm_v128i1_ty,llvm_ptr_ty,llvm_v32i32_ty], [IntrWriteMem]>; |
| 396 |
|
| 397 |
def int_hexagon_V6_vmaskedstoreq: Hexagon_custom_vms_Intrinsic; |
| 398 |
def int_hexagon_V6_vmaskedstorenq: Hexagon_custom_vms_Intrinsic; |
| 399 |
def int_hexagon_V6_vmaskedstorentq: Hexagon_custom_vms_Intrinsic; |
| 400 |
def int_hexagon_V6_vmaskedstorentnq: Hexagon_custom_vms_Intrinsic; |
| 401 |
|
| 402 |
def int_hexagon_V6_vmaskedstoreq_128B: Hexagon_custom_vms_Intrinsic_128B; |
| 403 |
def int_hexagon_V6_vmaskedstorenq_128B: Hexagon_custom_vms_Intrinsic_128B; |
| 404 |
def int_hexagon_V6_vmaskedstorentq_128B: Hexagon_custom_vms_Intrinsic_128B; |
| 405 |
def int_hexagon_V6_vmaskedstorentnq_128B: Hexagon_custom_vms_Intrinsic_128B; |
| 406 |
|
| 407 |
include "llvm/IR/IntrinsicsHexagonDep.td" |