Skip to content

Commit 2d77287

Browse files
committed
[PowerPC] Support set_flt_rounds builtin
1 parent 81e3e7e commit 2d77287

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,10 +2227,11 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
22272227
break;
22282228

22292229
case Builtin::BI__builtin_set_flt_rounds:
2230-
if (CheckBuiltinTargetInSupported(*this, BuiltinID, TheCall,
2231-
{llvm::Triple::x86, llvm::Triple::x86_64,
2232-
llvm::Triple::arm, llvm::Triple::thumb,
2233-
llvm::Triple::aarch64}))
2230+
if (CheckBuiltinTargetInSupported(
2231+
*this, BuiltinID, TheCall,
2232+
{llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::arm,
2233+
llvm::Triple::thumb, llvm::Triple::aarch64, llvm::Triple::ppc,
2234+
llvm::Triple::ppc64, llvm::Triple::ppc64le}))
22342235
return ExprError();
22352236
break;
22362237

clang/test/CodeGen/builtin_set_flt_rounds.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -o - | FileCheck %s
33
// RUN: %clang_cc1 -triple aarch64-gnu-linux %s -emit-llvm -o - | FileCheck %s
44
// RUN: %clang_cc1 -triple aarch64-windows-msvc %s -emit-llvm -o - | FileCheck %s
5+
// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s
6+
// RUN: %clang_cc1 -triple powerpc-ibm-aix %s -emit-llvm -o - | FileCheck %s
57
void test_builtin_set_flt_rounds() {
68
__builtin_set_flt_rounds(1);
79
// CHECK: call void @llvm.set.rounding(i32 1)

0 commit comments

Comments
 (0)