1//===-- AMDGPUIntrinsics.td - Common intrinsics  -*- tablegen -*-----------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines intrinsics that are used by all hw codegen targets.
11//
12//===----------------------------------------------------------------------===//
13
14let TargetPrefix = "AMDGPU", isTarget = 1 in {
15  def int_AMDGPU_clamp : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem]>;
16
17  def int_AMDGPU_kill : Intrinsic<[], [llvm_float_ty], []>;
18  def int_AMDGPU_kilp : Intrinsic<[], [], []>;
19  def int_AMDGPU_flbit_i32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
20
21  // Deprecated in favor of separate int_amdgcn_cube* intrinsics.
22  def int_AMDGPU_cube : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
23
24  // Deprecated in favor of expanded bit operations
25  def int_AMDGPU_bfe_i32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
26  def int_AMDGPU_bfe_u32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
27
28  def int_AMDGPU_rsq_clamped :  Intrinsic<
29    [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem]
30  >;
31
32  // Deprecated in favor of llvm.amdgcn.rsq
33  def int_AMDGPU_rsq : Intrinsic<
34    [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem]
35  >;
36
37  // Deprecated in favor of llvm.bitreverse
38  def int_AMDGPU_brev : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
39
40  // Deprecated in favor of llvm.amdgcn.s.barrier
41  def int_AMDGPU_barrier_local  : Intrinsic<[], [], [IntrConvergent]>;
42  def int_AMDGPU_barrier_global : Intrinsic<[], [], [IntrConvergent]>;
43
44  // Deprecated in favor of llvm.amdgcn.read.workdim
45  def int_AMDGPU_read_workdim : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>;
46}
47
48include "SIIntrinsics.td"
49