[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / clang / lib / Sema / SemaNVPTX.cpp
blobcc8941071463d3a331be5253b31568dfeda7c054
1 //===------ SemaNVPTX.cpp ------- NVPTX target-specific routines ----------===//
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 implements semantic analysis functions specific to NVPTX.
11 //===----------------------------------------------------------------------===//
13 #include "clang/Sema/SemaNVPTX.h"
14 #include "clang/Basic/TargetBuiltins.h"
15 #include "clang/Sema/Sema.h"
17 namespace clang {
19 SemaNVPTX::SemaNVPTX(Sema &S) : SemaBase(S) {}
21 bool SemaNVPTX::CheckNVPTXBuiltinFunctionCall(const TargetInfo &TI,
22 unsigned BuiltinID,
23 CallExpr *TheCall) {
24 switch (BuiltinID) {
25 case NVPTX::BI__nvvm_cp_async_ca_shared_global_4:
26 case NVPTX::BI__nvvm_cp_async_ca_shared_global_8:
27 case NVPTX::BI__nvvm_cp_async_ca_shared_global_16:
28 case NVPTX::BI__nvvm_cp_async_cg_shared_global_16:
29 return SemaRef.checkArgCountAtMost(TheCall, 3);
32 return false;
35 } // namespace clang