[PATCH] D37682: [mips] Handle UImm16_AltRelaxed match type

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 03:50:23 PDT 2017


sdardis accepted this revision.
sdardis added a comment.
This revision is now accepted and ready to land.

Hm, as far as I can see is what's currently happening--with dati $4, $4, 0x1FFFF for mips64r6 for example--is that the matcher is picking the mips64r6 instruction first, fails to parse it as the third operand is out of range, attempts to parse 'dati $4, $4, 0x1FFFF' as a microMIPS64R6 instruction, fails again as the third operand is out of range __but returns an error based on the last mnemonic matched__ despite that mnemonic being invalid as the target is mips64r6 and not in micromips mode. Since the microMIPS64r6 and MIPS64r6 instruction definitions disagree with each other, we don't get the expected match result, nor do we hit llvm_unreachable due to the error arising from attempting to match that instruction to the microMIPS64r6 instruction definition.

No need for a test case since as far as I can see it's impossible to hit the error path without fixing the microMIPS64r6 instruction definitions, but we're deprecating that backend anyway.

LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D37682





More information about the llvm-commits mailing list