davemgreen wrote: No the costing is done during a pass that adds and removes them. This could be handled specially in that pass, but it is more general fix to give a zero cost to everywhere. https://github.com/llvm/llvm-project/pull/75294