New Target Intrinsic Lowering and Legalization Mechanism

We should have a way of legalizing builtins/intrinsics that can involve creating new statements. Not every builtin may be replaceable with an expression. Has anybody thought about doing that?