https://github.com/arsenm commented: Why do you need to directly constant fold the libcalls? We have intrinsics for these, which we arguably should just always replace libcalls with https://github.com/llvm/llvm-project/pull/154799