[llvm] [ConstantFold] Fold `ilogb` and `ilogbf` when the input parameter is a constant value. (PR #113014)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 19 06:40:28 PDT 2024


https://github.com/arsenm approved this pull request.

LGTM but please consider cleaning up this function. There should be a switch over intrinsic IDs.

The repeated TLI->has(func) in each case could be done once for all the libcall cases.

It would also be good to avoid explicitly listing the edge cases in the pre-check of the ConstantFoldFP call 

https://github.com/llvm/llvm-project/pull/113014


More information about the llvm-commits mailing list