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;
15 def IntrNoMem : IntrinsicProperty;
16 def IntrHasSideEffects : IntrinsicProperty;
19 class Intrinsic<list<LLVMType> ret_types,
20 list<LLVMType> param_types = [],
21 list<IntrinsicProperty> intr_properties = [],
23 list<SDNodeProperty> sd_properties = []> : SDPatternOperator {
24 string LLVMName = name;
25 string TargetPrefix = "";
26 list<LLVMType> RetTypes = ret_types;
27 list<LLVMType> ParamTypes = param_types;
28 list<IntrinsicProperty> IntrProperties = intr_properties;
29 let Properties = sd_properties;
34 // ... this intrinsic.
35 def int_random_gen : Intrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrHasSideEffects]>;
37 // CHECK: 1, // llvm.random.gen
39 // CHECK-NEXT: Atts[] = {Attribute::NoUnwind}