blob: 81daf0684945c86ca18dd73beeba13cc434b5f36 [file] [log] [blame]
Reid Klecknerf5890e42018-06-23 02:02:38 +00001// RUN: llvm-tblgen -gen-intrinsic-enums %s | FileCheck %s
Artem Belevich786ca6a2017-10-12 17:40:00 +00002// XFAIL: vg_leak
3
4class IntrinsicProperty;
Matt Arsenault303327d2017-12-20 19:36:28 +00005class SDNodeProperty;
Artem Belevich786ca6a2017-10-12 17:40:00 +00006
7class ValueType<int size, int value> {
8 string Namespace = "MVT";
9 int Size = size;
10 int Value = value;
11}
12
13class LLVMType<ValueType vt> {
14 ValueType VT = vt;
15}
16
17class Intrinsic<string name, list<LLVMType> ret_types = []> {
18 string LLVMName = name;
19 bit isTarget = 0;
20 string TargetPrefix = "";
21 list<LLVMType> RetTypes = ret_types;
22 list<LLVMType> ParamTypes = [];
23 list<IntrinsicProperty> IntrProperties = [];
Matt Arsenault303327d2017-12-20 19:36:28 +000024 list<SDNodeProperty> Properties = [];
Artem Belevich786ca6a2017-10-12 17:40:00 +000025}
26
27def iAny : ValueType<0, 253>;
28def llvm_anyint_ty : LLVMType<iAny>;
29
30// Make sure we can return up to 8 values
31// CHECK: returns_8_results // llvm.returns.8.results
32def int_returns_8_results : Intrinsic<"llvm.returns.8.results",
33 [llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty,
34 llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty, llvm_anyint_ty]>;