1 // RUN: llvm-tblgen -gen-intrinsic-enums %s | FileCheck %s
4 class IntrinsicProperty<bit is_default = 0> {
5 bit IsDefault = is_default;
10 class ValueType<int size, int value> {
11 string Namespace = "MVT";
16 class LLVMType<ValueType vt> {
20 class Intrinsic<string name, list<LLVMType> param_types = []> {
21 string LLVMName = name;
23 string TargetPrefix = "";
24 list<LLVMType> RetTypes = [];
25 list<LLVMType> ParamTypes = param_types;
26 list<IntrinsicProperty> IntrProperties = [];
27 list<SDNodeProperty> Properties = [];
28 bit DisableDefaultAttributes = 1;
31 def iAny : ValueType<0, 253>;
32 def llvm_anyint_ty : LLVMType<iAny>;
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]>;