1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker// XFAIL: vg_leak 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Workerclass IntrinsicProperty; 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workerclass ValueType<int size, int value> { 7*9880d681SAndroid Build Coastguard Worker string Namespace = "MVT"; 8*9880d681SAndroid Build Coastguard Worker int Size = size; 9*9880d681SAndroid Build Coastguard Worker int Value = value; 10*9880d681SAndroid Build Coastguard Worker} 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workerclass LLVMType<ValueType vt> { 13*9880d681SAndroid Build Coastguard Worker ValueType VT = vt; 14*9880d681SAndroid Build Coastguard Worker} 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerclass Intrinsic<string name, list<LLVMType> param_types = []> { 17*9880d681SAndroid Build Coastguard Worker string LLVMName = name; 18*9880d681SAndroid Build Coastguard Worker bit isTarget = 0; 19*9880d681SAndroid Build Coastguard Worker string TargetPrefix = ""; 20*9880d681SAndroid Build Coastguard Worker list<LLVMType> RetTypes = []; 21*9880d681SAndroid Build Coastguard Worker list<LLVMType> ParamTypes = param_types; 22*9880d681SAndroid Build Coastguard Worker list<IntrinsicProperty> IntrProperties = []; 23*9880d681SAndroid Build Coastguard Worker} 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workerdef iAny : ValueType<0, 125>; 26*9880d681SAndroid Build Coastguard Workerdef llvm_anyint_ty : LLVMType<iAny>; 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Worker// Make sure we generate the long name without crashing 29*9880d681SAndroid Build Coastguard Worker// 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 30*9880d681SAndroid Build Coastguard Workerdef int_foo : Intrinsic<"llvm.foo", [llvm_anyint_ty]>; 31*9880d681SAndroid Build Coastguard Workerdef 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]>; 32*9880d681SAndroid Build Coastguard Worker 33