paulwalker-arm wrote: Perhaps a better option is for the code generater to emit the function calls as part of legalisation. If we did that then I'd be more comfortable with modifying `getArithmeticInstrCost`. https://github.com/llvm/llvm-project/pull/82488