intrinsic-order.td 933 B

123456789101112131415161718192021222324252627282930313233343536
  1. // RUN: llvm-tblgen -gen-intrinsic %s | FileCheck %s
  2. // XFAIL: vg_leak
  3. class IntrinsicProperty;
  4. class ValueType<int size, int value> {
  5. string Namespace = "MVT";
  6. int Size = size;
  7. int Value = value;
  8. }
  9. class LLVMType<ValueType vt> {
  10. ValueType VT = vt;
  11. }
  12. class Intrinsic<string name, list<LLVMType> param_types = []> {
  13. string LLVMName = name;
  14. bit isTarget = 0;
  15. string TargetPrefix = "";
  16. list<LLVMType> RetTypes = [];
  17. list<LLVMType> ParamTypes = param_types;
  18. list<IntrinsicProperty> Properties = [];
  19. }
  20. def iAny : ValueType<0, 254>;
  21. def llvm_anyint_ty : LLVMType<iAny>;
  22. // Make sure an intrinsic name that is a prefix of another is checked after the
  23. // other.
  24. // CHECK: if (NameR.startswith("oo.bar.")) return Intrinsic::foo_bar;
  25. // CHECK: if (NameR.startswith("oo.")) return Intrinsic::foo;
  26. def int_foo : Intrinsic<"llvm.foo", [llvm_anyint_ty]>;
  27. def int_foo_bar : Intrinsic<"llvm.foo.bar", [llvm_anyint_ty]>;