[InstCombine] Signed saturation patterns
[llvm-complete.git] / include / llvm / IR / IntrinsicsBPF.td
blob3618cc6a4128dad699480c7034e2521eacaa6e0b
1 //===- IntrinsicsBPF.td - Defines BPF 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 BPF-specific intrinsics.
11 //===----------------------------------------------------------------------===//
13 // Specialized loads from packet
14 let TargetPrefix = "bpf" in {  // All intrinsics start with "llvm.bpf."
15   def int_bpf_load_byte : GCCBuiltin<"__builtin_bpf_load_byte">,
16               Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>;
17   def int_bpf_load_half : GCCBuiltin<"__builtin_bpf_load_half">,
18               Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>;
19   def int_bpf_load_word : GCCBuiltin<"__builtin_bpf_load_word">,
20               Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>;
21   def int_bpf_pseudo : GCCBuiltin<"__builtin_bpf_pseudo">,
22               Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty]>;
23   def int_bpf_preserve_field_info : GCCBuiltin<"__builtin_bpf_preserve_field_info">,
24               Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty, llvm_i64_ty],
25               [IntrNoMem, ImmArg<1>]>;