[PATCH] D17068: [mips][microMIPS] Fix for "Cannot copy registers" assertion

Hrvoje Varga via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 02:17:27 PDT 2016


hvarga added a comment.

Matthew reminded me about the bug we had in GCC for microMIPS that related to SW16. The bug was that we did not account for the special register class for SW16 where it allows $0 as a source instead of $16.

This patch introduced the same invalid behavior. After applying this patch (the previous version) CodeGen invalidly chooses register $1 as an operand to LW16 and SW16. But those instructions have 3-bit register fields. This means that LW16 and SW16 can only have a GPRs $2-$7, $16, $17.

But like I said, this is now fixed with the newest version of the patch.


http://reviews.llvm.org/D17068





More information about the llvm-commits mailing list