IntrinsicsSPIRV.td 2.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. //===- IntrinsicsSPIRV.td - Defines SPIRV intrinsics -------*- tablegen -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines all of the SPIRV-specific intrinsics.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. let TargetPrefix = "spv" in {
  13. def int_spv_assign_type : Intrinsic<[], [llvm_any_ty, llvm_metadata_ty]>;
  14. def int_spv_assign_name : Intrinsic<[], [llvm_any_ty, llvm_vararg_ty]>;
  15. def int_spv_track_constant : Intrinsic<[llvm_any_ty], [llvm_any_ty, llvm_metadata_ty]>;
  16. def int_spv_init_global : Intrinsic<[], [llvm_any_ty, llvm_any_ty]>;
  17. def int_spv_unref_global : Intrinsic<[], [llvm_any_ty]>;
  18. def int_spv_gep : Intrinsic<[llvm_anyptr_ty], [llvm_i1_ty, llvm_any_ty, llvm_vararg_ty], [ImmArg<ArgIndex<0>>]>;
  19. def int_spv_load : Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty, llvm_i16_ty, llvm_i8_ty], [ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
  20. def int_spv_store : Intrinsic<[], [llvm_any_ty, llvm_anyptr_ty, llvm_i16_ty, llvm_i8_ty], [ImmArg<ArgIndex<2>>, ImmArg<ArgIndex<3>>]>;
  21. def int_spv_extractv : Intrinsic<[llvm_any_ty], [llvm_i32_ty, llvm_vararg_ty]>;
  22. def int_spv_insertv : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_any_ty, llvm_vararg_ty]>;
  23. def int_spv_extractelt : Intrinsic<[llvm_any_ty], [llvm_any_ty, llvm_anyint_ty]>;
  24. def int_spv_insertelt : Intrinsic<[llvm_any_ty], [llvm_any_ty, llvm_any_ty, llvm_anyint_ty]>;
  25. def int_spv_const_composite : Intrinsic<[llvm_i32_ty], [llvm_vararg_ty]>;
  26. def int_spv_bitcast : Intrinsic<[llvm_any_ty], [llvm_any_ty]>;
  27. def int_spv_switch : Intrinsic<[], [llvm_any_ty, llvm_vararg_ty]>;
  28. def int_spv_cmpxchg : Intrinsic<[llvm_i32_ty], [llvm_any_ty, llvm_vararg_ty]>;
  29. def int_spv_unreachable : Intrinsic<[], []>;
  30. def int_spv_alloca : Intrinsic<[llvm_any_ty], []>;
  31. }