1 // RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
3 class IntrinsicProperty;
5 class ValueType<int size, int value> {
6 string Namespace = "MVT";
11 class LLVMType<ValueType vt> {
15 class Intrinsic<string name, list<LLVMType> param_types = []> {
16 string LLVMName = name;
18 string TargetPrefix = "";
19 list<LLVMType> RetTypes = [];
20 list<LLVMType> ParamTypes = param_types;
21 list<IntrinsicProperty> Properties = [];
24 def iAny : ValueType<0, 254>;
25 def llvm_anyint_ty : LLVMType<iAny>;
28 // Make sure an intrinsic name that is a prefix of another is checked after the
31 // CHECK: if (NameR.startswith("oo.bar.")) return Intrinsic::foo_bar;
32 // CHECK: if (NameR.startswith("oo.")) return Intrinsic::foo;
34 def int_foo : Intrinsic<"llvm.foo", [llvm_anyint_ty]>;
35 def int_foo_bar : Intrinsic<"llvm.foo.bar", [llvm_anyint_ty]>;