Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CGBuiltin.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 2,970 Lines • ▼ Show 20 Lines | RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, | ||||
case Builtin::BI__builtin_isgreaterequal: | case Builtin::BI__builtin_isgreaterequal: | ||||
case Builtin::BI__builtin_isless: | case Builtin::BI__builtin_isless: | ||||
case Builtin::BI__builtin_islessequal: | case Builtin::BI__builtin_islessequal: | ||||
case Builtin::BI__builtin_islessgreater: | case Builtin::BI__builtin_islessgreater: | ||||
case Builtin::BI__builtin_isunordered: { | case Builtin::BI__builtin_isunordered: { | ||||
// Ordered comparisons: we know the arguments to these are matching scalar | // Ordered comparisons: we know the arguments to these are matching scalar | ||||
// floating point values. | // floating point values. | ||||
CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E); | CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E); | ||||
// FIXME: for strictfp/IEEE-754 we need to not trap on SNaN here. | |||||
Value *LHS = EmitScalarExpr(E->getArg(0)); | Value *LHS = EmitScalarExpr(E->getArg(0)); | ||||
Value *RHS = EmitScalarExpr(E->getArg(1)); | Value *RHS = EmitScalarExpr(E->getArg(1)); | ||||
switch (BuiltinID) { | switch (BuiltinID) { | ||||
default: llvm_unreachable("Unknown ordered comparison"); | default: llvm_unreachable("Unknown ordered comparison"); | ||||
case Builtin::BI__builtin_isgreater: | case Builtin::BI__builtin_isgreater: | ||||
LHS = Builder.CreateFCmpOGT(LHS, RHS, "cmp"); | LHS = Builder.CreateFCmpOGT(LHS, RHS, "cmp"); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 16,377 Lines • Show Last 20 Lines |