Currently, UImm16_AltRelaxed match type is not handled in MatchAndEmitInstruction(...) function, which may result in llvm_unreachable() behavior.
This patch adds necessary case for this match type.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
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.