[clang] feec067 - Revert "Add __builtin_set_flt_rounds"
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 9 05:03:15 PST 2023
Author: Aaron Ballman
Date: 2023-03-09T08:02:31-05:00
New Revision: feec067982abd806c2cf444956446b604bf7cf4c
URL: https://github.com/llvm/llvm-project/commit/feec067982abd806c2cf444956446b604bf7cf4c
DIFF: https://github.com/llvm/llvm-project/commit/feec067982abd806c2cf444956446b604bf7cf4c.diff
LOG: Revert "Add __builtin_set_flt_rounds"
This reverts commit 24b823554acd25009731b2519880aa18c7263550.
These changes broke the PPC build bot.
Added:
Modified:
clang/include/clang/Basic/Builtins.def
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/builtins.c
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/Builtins.def b/clang/include/clang/Basic/Builtins.def
index e7c483bee7193..478eb59bb7712 100644
--- a/clang/include/clang/Basic/Builtins.def
+++ b/clang/include/clang/Basic/Builtins.def
@@ -397,7 +397,6 @@ BUILTIN(__builtin_truncf16, "hh", "Fnc")
// Access to floating point environment
BUILTIN(__builtin_flt_rounds, "i", "n")
-BUILTIN(__builtin_set_flt_rounds, "vi", "n")
// C99 complex builtins
BUILTIN(__builtin_cabs, "dXd", "Fne")
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index a8e937ad66c18..cea4727422c0b 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -3375,14 +3375,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
return RValue::get(Result);
}
- case Builtin::BI__builtin_set_flt_rounds: {
- Function *F = CGM.getIntrinsic(Intrinsic::set_rounding);
-
- Value *V = EmitScalarExpr(E->getArg(0));
- Builder.CreateCall(F, V);
- return RValue::get(nullptr);
- }
-
case Builtin::BI__builtin_fpclassify: {
CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E);
// FIXME: for strictfp/IEEE-754 we need to not trap on SNaN here.
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 2e7a2e3c57594..485351f157fde 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2146,14 +2146,6 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
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}))
- return ExprError();
- break;
-
case Builtin::BI__builtin_isgreater:
case Builtin::BI__builtin_isgreaterequal:
case Builtin::BI__builtin_isless:
diff --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c
index d523d3100c04c..1281c5e13ae3e 100644
--- a/clang/test/CodeGen/builtins.c
+++ b/clang/test/CodeGen/builtins.c
@@ -278,8 +278,6 @@ void test_float_builtins(__fp16 *H, float F, double D, long double LD) {
res = __builtin_flt_rounds();
// CHECK: call i32 @llvm.get.rounding(
- __builtin_set_flt_rounds(1);
- // CHECK: call void @llvm.set.rounding(i32 1)
}
// CHECK-LABEL: define{{.*}} void @test_float_builtin_ops
More information about the cfe-commits
mailing list