aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2024-05-03 14:01:09 -0500
committerGitHub <noreply@github.com>2024-05-03 14:01:09 -0500
commit70b79a9ccd03f93fc4c8464a91b6bef3aab322d3 (patch)
tree100a206eb9ef4379c6c1fcdf5d9d45d8664126d3 /clang/lib/Sema/SemaChecking.cpp
parent2f58b9aae2d6f1aeaecd98766ef31cebc0dcbb5b (diff)
downloadllvm-70b79a9ccd03f93fc4c8464a91b6bef3aab322d3.zip
llvm-70b79a9ccd03f93fc4c8464a91b6bef3aab322d3.tar.gz
llvm-70b79a9ccd03f93fc4c8464a91b6bef3aab322d3.tar.bz2
[AMDGPU] Allow the `__builtin_flt_rounds` functions on AMDGPU (#90994)
Summary: Previous patches added support for the LLVM rounding intrinsic functions. This patch allows them to me emitted using the clang builtins when targeting AMDGPU.
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 6d0e93c..3179d54 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2533,18 +2533,18 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
case Builtin::BI_bittestandset64:
case Builtin::BI_interlockedbittestandreset64:
case Builtin::BI_interlockedbittestandset64:
- if (CheckBuiltinTargetInSupported(*this, BuiltinID, TheCall,
- {llvm::Triple::x86_64, llvm::Triple::arm,
- llvm::Triple::thumb,
- llvm::Triple::aarch64}))
+ if (CheckBuiltinTargetInSupported(
+ *this, BuiltinID, TheCall,
+ {llvm::Triple::x86_64, llvm::Triple::arm, llvm::Triple::thumb,
+ llvm::Triple::aarch64, llvm::Triple::amdgcn}))
return ExprError();
break;
case Builtin::BI__builtin_set_flt_rounds:
- if (CheckBuiltinTargetInSupported(*this, BuiltinID, TheCall,
- {llvm::Triple::x86, llvm::Triple::x86_64,
- llvm::Triple::arm, llvm::Triple::thumb,
- llvm::Triple::aarch64}))
+ if (CheckBuiltinTargetInSupported(
+ *this, BuiltinID, TheCall,
+ {llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::arm,
+ llvm::Triple::thumb, llvm::Triple::aarch64, llvm::Triple::amdgcn}))
return ExprError();
break;