simeonkr wrote: @fhahn I wasn't sure how to test this in a generic way as the cost model is target-dependent. Would it be fine to add a test case for a specific target (such as RISC-V)? https://github.com/llvm/llvm-project/pull/71793