150
|
1 // RUN: llvm-tblgen -gen-intrinsic-enums %s | FileCheck %s
|
|
2 // XFAIL: vg_leak
|
|
3
|
207
|
4 class IntrinsicProperty<bit is_default = 0> {
|
|
5 bit IsDefault = is_default;
|
|
6 }
|
|
7
|
150
|
8 class SDNodeProperty;
|
|
9
|
|
10 class ValueType<int size, int value> {
|
|
11 string Namespace = "MVT";
|
|
12 int Size = size;
|
|
13 int Value = value;
|
|
14 }
|
|
15
|
|
16 class LLVMType<ValueType vt> {
|
|
17 ValueType VT = vt;
|
|
18 }
|
|
19
|
|
20 class Intrinsic<string name, list<LLVMType> param_types = []> {
|
|
21 string LLVMName = name;
|
|
22 bit isTarget = 0;
|
|
23 string TargetPrefix = "";
|
|
24 list<LLVMType> RetTypes = [];
|
|
25 list<LLVMType> ParamTypes = param_types;
|
|
26 list<IntrinsicProperty> IntrProperties = [];
|
|
27 list<SDNodeProperty> Properties = [];
|
207
|
28 bit DisableDefaultAttributes = 1;
|
150
|
29 }
|
|
30
|
|
31 def iAny : ValueType<0, 253>;
|
|
32 def llvm_anyint_ty : LLVMType<iAny>;
|
|
33
|
|
34 // Make sure we generate the long name without crashing
|
|
35 // CHECK: this_is_a_really_long_intrinsic_name_but_we_should_still_not_crash, // llvm.this.is.a.really.long.intrinsic.name.but.we.should.still.not.crash
|
|
36 def int_foo : Intrinsic<"llvm.foo", [llvm_anyint_ty]>;
|
|
37 def int_this_is_a_really_long_intrinsic_name_but_we_should_still_not_crash : Intrinsic<"llvm.this.is.a.really.long.intrinsic.name.but.we.should.still.not.crash", [llvm_anyint_ty]>;
|
|
38
|