Skip to content

Commit 27011c8

Browse files
committed
Fixed up condition to clearer code.
1 parent 755d630 commit 27011c8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5802,12 +5802,16 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
58025802
if (FD && FD->getNameInfo().getName().isIdentifier()) {
58035803
StringRef FuncName = FD->getName();
58045804
const bool IsFloat32Type = FD->getReturnType()->isFloat32Type();
5805-
if (!getLangOpts().FPAccuracyFuncMap.empty() ||
5806-
!getLangOpts().FPAccuracyVal.empty() ||
5805+
bool hasFPAccuracyFuncMap = !getLangOpts().FPAccuracyFuncMap.empty();
5806+
bool hasFPAccuracyVal = !getLangOpts().FPAccuracyVal.empty();
5807+
bool isFp32SqrtFunction =
58075808
(FuncName == "sqrt" && !getLangOpts().OffloadFp32PrecSqrt &&
5808-
IsFloat32Type) ||
5809+
IsFloat32Type);
5810+
bool isFP32FdivFunction =
58095811
(FuncName == "fdiv" && !getLangOpts().OffloadFp32PrecDiv &&
5810-
IsFloat32Type)) {
5812+
IsFloat32Type);
5813+
if (hasFPAccuracyFuncMap || hasFPAccuracyVal || isFp32SqrtFunction ||
5814+
isFP32FdivFunction) {
58115815
CI = MaybeEmitFPBuiltinofFD(IRFuncTy, IRCallArgs, CalleePtr,
58125816
FD->getName(), FD->getBuiltinID());
58135817
if (CI)

0 commit comments

Comments
 (0)