I agree with Michael, the idea looks correct. By the way I have checked the patch using the LLVM test suite for MIPS target and found no regressions. http://reviews.llvm.org/D7278 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/