Skip to content

Commit ca14318

Browse files
committed
Run Clang-format
1 parent d862a1a commit ca14318

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,11 +2204,11 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
22042204
switch (IntrinsicID) {
22052205
default: break;
22062206
case Intrinsic::log:
2207-
#if defined(__FLOAT128__) && defined (HAS_LOGF128)
2208-
if (Ty->isFP128Ty()){
2207+
#if defined(__FLOAT128__) && defined(HAS_LOGF128)
2208+
if (Ty->isFP128Ty()) {
22092209
return ConstantFP::get(Ty, logf128(APF.convertToQuad()));
22102210
}
2211-
#endif
2211+
#endif
22122212
return ConstantFoldFP(log, APF, Ty);
22132213
case Intrinsic::log2:
22142214
// TODO: What about hosts that lack a C99 library?

llvm/unittests/Analysis/ConstantLogf128.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ TEST(ConstantFoldLogf128Fixture, ConstantFoldLogf128) {
3535
FunctionType *FP128FP128Prototype =
3636
FunctionType::get(FP128Ty, {FP128Ty}, false);
3737
Constant *Constant2L = ConstantFP::get128(FP128Ty, 2.0L);
38-
Function *Logf128 = Function::Create(
39-
FP128FP128Prototype, Function::ExternalLinkage, "llvm.log.f128", MainModule);
38+
Function *Logf128 =
39+
Function::Create(FP128FP128Prototype, Function::ExternalLinkage,
40+
"llvm.log.f128", MainModule);
4041
CallInst *Logf128Call = Builder.CreateCall(Logf128, Constant2L);
4142

4243
TargetLibraryInfoImpl TLII(Triple(MainModule.getTargetTriple()));
4344
TargetLibraryInfo TLI(TLII, Logf128TestFunction);
44-
Constant *FoldResult = ConstantFoldCall(Logf128Call, Logf128, Constant2L, &TLI);
45+
Constant *FoldResult =
46+
ConstantFoldCall(Logf128Call, Logf128, Constant2L, &TLI);
4547

4648
#ifndef HAS_LOGF128
4749
ASSERT_TRUE(FoldResult == nullptr);
@@ -58,10 +60,10 @@ TEST(ConstantFoldLogf128Fixture, ConstantFoldLogf128) {
5860

5961
ASSERT_STREQ(LongDoubleHexString,
6062
std::string("0X1.62E42FEFA39EF000000000000000000P-1").c_str());
61-
#endif //HAS_LOGF128
62-
#else // __FLOAT128__
63+
#endif // HAS_LOGF128
64+
#else // __FLOAT128__
6365
ASSERT_TRUE(true);
6466
#endif
6567
}
6668

67-
}
69+
} // namespace

0 commit comments

Comments
 (0)