Skip to content

Commit cbeb725

Browse files
committed
constant folding log1p
1 parent b49c6c1 commit cbeb725

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,7 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
23972397
break;
23982398
case LibFunc_log1p:
23992399
case LibFunc_log1pf:
2400-
if (APF > APFloat::getOne(APF.getSemantics(), true) && TLI->has(Func))
2400+
if (APF > APFloat(APF.getSemantics(), "-1") && TLI->has(Func))
24012401
return ConstantFoldFP(log1p, APF, Ty);
24022402
break;
24032403
case LibFunc_logl:

0 commit comments

Comments
 (0)