I believe legalization is really expecting that ReplaceNodeResults will return something with the same type as the thing that's being legalized. Ultimately, it uses the output to replace the uses in the DAG so the type should match to make that work.
In this case the intrinsic returns i1 and the legalization promotes it to i32, but we need to return an i1, to insert a truncate back to i1. The new truncate will get added to worklist and end up being legalized itself, but won't require custom legalization.
With this fixed we can remove some code from PromoteIntRes_SETCC that seemed to only exist to deal with the intrinsic being replaced with a larger type without changing the other operand. With the truncate being used for connectivity this doesn't happen anymore.