This is based on D122125. In D122125, we added a new post-isel pass to expand two new ctr loop pseudo instructions MTCTR8Pseudo and DecreaseCTR8Pseudo.
This patch maps hardware loop intrinsics loop_decrement and set_loop_iteration to the new PowerPC pseudo instructions, so that the hardware loop intrinsics will be expanded to normal cmp+branch form or ctrloop form based on the CTR register usage on MIR level.
We reuse legacy MTCTR8loop and update DecreaseCTR8Pseudo to DecreaseCTR8loop as well.
We still need another patch to remove the IR level CTR clobber check codes in PPCTargetTransformInfo.cpp
Can we make it in another NFC patch?