[llvm] [SelectionDAG] Handle roundeven libcall in visitCall (PR #170690)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 14:43:30 PST 2025


arsenm wrote:

> SimplifyLibCalls is a huge mess right now. 

Correct

> There are some functions that try to optimize a libcall and return the corresponding intrinsic as a last resort, there are some that try to optimize a libcall and just bail out entirely if the optimization doesn't work, and there are some (like `optimizeSymmetricCall`) that optimize to _other libcalls_ and then exit early because, well, the optimization worked.

With the status quo, it's generally works out to do intrinsic->intrinsic transformations, or libcall->libcall transformations. In theory the intrinsic should always works, in practice many fail depending on target library support but there's no formal relationship between the two, or way to query if that will work. TargetLibraryInfo is used as a hack for some intrinsic transforms, but that's not strictly correct 

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


More information about the llvm-commits mailing list