nikic wrote: I think it's reasonable to do the libcall -> intrinsic replacement *somewhere* in LLVM, but I agree that that place isn't SDAG. This is something that should be done by SLC and SLC only. https://github.com/llvm/llvm-project/pull/170690