Skip to content

Commit 5f29f64

Browse files
committed
[LibCallShrinkWrap] Added ilogb in performCallErrors()
ilogb libcall was not being constant folded correctly. It was due to LibCallShrinkWrap pass not handling ilogbx, as a result SimplifyCFG pass did not remove redundant libcall. This patch adds ilogb case in performCallErrors(). Fixes #101873
1 parent 0384069 commit 5f29f64

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ bool LibCallsShrinkWrap::performCallErrors(CallInst *CI,
246246
case LibFunc_logb: // Same as log
247247
case LibFunc_logbf: // Same as log
248248
case LibFunc_logbl: // Same as log
249+
case LibFunc_ilogb: // Same as log
249250
{
250251
++NumWrappedOneCond;
251252
Cond = createCond(CI, CmpInst::FCMP_OLE, 0.0f);

0 commit comments

Comments
 (0)