Skip to content

Commit

Permalink
Revert "Add __builtin_set_flt_rounds"
Browse files Browse the repository at this point in the history
This reverts commit 24b8235.

These changes broke the PPC build bot.
  • Loading branch information
AaronBallman committed Mar 9, 2023
1 parent 9aa54db commit feec067
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion clang/include/clang/Basic/Builtins.def
Expand Up @@ -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")
Expand Down
8 changes: 0 additions & 8 deletions clang/lib/CodeGen/CGBuiltin.cpp
Expand Up @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions clang/lib/Sema/SemaChecking.cpp
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions clang/test/CodeGen/builtins.c
Expand Up @@ -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
Expand Down

0 comments on commit feec067

Please sign in to comment.