1 // RUN: llvm-tblgen -gen-intrinsic-impl -I %p/../../include %s | FileCheck %s
3 // Get the minimum blurb necessary to process ...
4 include "llvm/CodeGen/ValueTypes.td"
5 include "llvm/CodeGen/SDNodeProperties.td"
7 class LLVMType<ValueType vt> {
12 def llvm_i32_ty : LLVMType<i32>;
14 class IntrinsicProperty<bit is_default = 0> {
15 bit IsDefault = is_default;
18 def IntrNoMem : IntrinsicProperty;
19 def IntrHasSideEffects : IntrinsicProperty;
21 class Intrinsic<list<LLVMType> ret_types,
22 list<LLVMType> param_types = [],
23 list<IntrinsicProperty> intr_properties = [],
25 list<SDNodeProperty> sd_properties = [],
26 bit disable_default_attributes = 0> : SDPatternOperator {
27 string LLVMName = name;
28 string TargetPrefix = "";
29 list<LLVMType> RetTypes = ret_types;
30 list<LLVMType> ParamTypes = param_types;
31 list<IntrinsicProperty> IntrProperties = intr_properties;
32 let Properties = sd_properties;
33 bit DisableDefaultAttributes = 1;
37 bit DisableDefaultAttributes = disable_default_attributes;
40 // ... this intrinsic.
41 def int_random_gen : Intrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrHasSideEffects]>;
43 // CHECK: 1, // llvm.random.gen
45 // CHECK-NEXT: Atts[] = {Attribute::NoUnwind}