• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- LLVMAVX512.td - LLVMAVX512 dialect op definitions --*- tablegen -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the basic operations for the LLVMAVX512 dialect.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVMIR_AVX512_OPS
14#define LLVMIR_AVX512_OPS
15
16include "mlir/Dialect/LLVMIR/LLVMOpBase.td"
17
18//===----------------------------------------------------------------------===//
19// LLVMAVX512 dialect definition
20//===----------------------------------------------------------------------===//
21
22def LLVMAVX512_Dialect : Dialect {
23  let name = "llvm_avx512";
24  let cppNamespace = "::mlir::LLVM";
25}
26
27//----------------------------------------------------------------------------//
28// MLIR LLVM AVX512 intrinsics using the MLIR LLVM Dialect type system
29//----------------------------------------------------------------------------//
30
31class LLVMAVX512_IntrOp<string mnemonic, list<OpTrait> traits = []> :
32  LLVM_IntrOpBase<LLVMAVX512_Dialect, mnemonic,
33                  "x86_avx512_" # !subst(".", "_", mnemonic),
34                  [], [], traits, 1>;
35
36def LLVM_x86_avx512_mask_rndscale_ps_512 :
37  LLVMAVX512_IntrOp<"mask.rndscale.ps.512">,
38  Arguments<(ins LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type)>;
39
40def LLVM_x86_avx512_mask_rndscale_pd_512 :
41  LLVMAVX512_IntrOp<"mask.rndscale.pd.512">,
42  Arguments<(ins LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type)>;
43
44def LLVM_x86_avx512_mask_scalef_ps_512 :
45  LLVMAVX512_IntrOp<"mask.scalef.ps.512">,
46  Arguments<(ins LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type)>;
47
48def LLVM_x86_avx512_mask_scalef_pd_512 :
49  LLVMAVX512_IntrOp<"mask.scalef.pd.512">,
50  Arguments<(ins LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type, LLVM_Type)>;
51
52#endif // AVX512_OPS
53