1 // RUN: llvm-tblgen -gen-intrinsic-impl %s | FileCheck %s
3 // This test is validating that it an Intrinsic with an LLVMPointerType to
4 // llvm_any_ty still properly work after r363233. That patch rewrote the
5 // substitution handling code in the Intrinsic Emitter, and didn't consider this
6 // case, so TableGen would hit an assertion in EncodeFixedType that was checking
7 // to ensure that the substitution being processed was correctly replaced.
9 class IntrinsicProperty;
12 class ValueType<int size, int value> {
13 string Namespace = "MVT";
18 def iPTR : ValueType<0 , 254>;
19 def Any : ValueType<0 , 255>;
21 class LLVMType<ValueType vt> {
27 class Intrinsic<list<LLVMType> ret_types> {
29 string TargetPrefix = ""; // Set to a prefix for target-specific intrinsics.
30 list<LLVMType> RetTypes = ret_types;
31 list<LLVMType> ParamTypes = [];
32 list<IntrinsicProperty> IntrProperties = [];
33 list<SDNodeProperty> Properties = [];
37 class LLVMQualPointerType<LLVMType elty>
43 class LLVMPointerType<LLVMType elty>
44 : LLVMQualPointerType<elty>;
47 def llvm_any_ty : LLVMType<Any>;
49 def i8 : ValueType<8, 3>;
50 def llvm_i8_ty : LLVMType<i8>;
52 def int_has_ptr_to_any : Intrinsic<[LLVMPointerType<llvm_any_ty>, llvm_i8_ty]>;
53 // CHECK: /* 0 */ 21, 14, 15, 0, 2, 0