[PATCH] D10537: [mips] Add support for branch-likely pseudo-instructions

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 07:06:51 PDT 2015


dsanders added a comment.

> There is a problem with ULHU/ULW tests, similar to the one with parsing labels. When PredicateControl is attached to the MipsAsmPseudoInst, second parameter of ULHU/ULW cant be parsed correctly, causing tests to fail. Moving it to CondBranchPseudo is workaround to make the patch applicable.


The problem seems to be that we matched these instructions regardless of the predicates because PredicateControl wasn't in the hierarchy. This is definitely a bug, but it also had a somewhat desirable effect. The expansion emits a better error message than the tablegen-erated code does.

Given that this is a macro, one possible fix would be to drop the ISA_MIPS1_NOT_32R6_64R6 and comment on why it matches for unsupported cases (to emit a more precise error message during the expansion). I'd go with that and try to make the tablegen-erated errors better in a later patch (and remove this hack when that's done).


http://reviews.llvm.org/D10537





More information about the llvm-commits mailing list