artagnon wrote: Thanks for the review: I've now moved the logic to simplifyRecipe, leaving a couple of TODOs. If this is the desired approach, we can improve upon it in follow-ups. https://github.com/llvm/llvm-project/pull/125365