efriedma added a comment. Instead of scattering casts all over the place, can we just fix TargetLibraryInfoImpl::isValidProtoForLibFunc to reject libcalls which use integers with the wrong width? Repository: rL LLVM https://reviews.llvm.org/D41184