https://github.com/arsenm commented: I'm not sure why we need a dedicated phi function. It should essentially be the type legalization cost for any value. Phis aren't a real operation, they are just split to legal registers https://github.com/llvm/llvm-project/pull/91016