wangpc-pp wrote: I added the hook (the difference compared to the initial version is that the scale factor is a float now so that the target can do a fine-grained control) and adjusted it for RISC-V. Please review @preames @lukel97 https://github.com/llvm/llvm-project/pull/113675