[llvm] r313077 - [mips] handle UImm16_AltRelaxed match type

Petar Jovanovic via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 14:43:33 PDT 2017


Author: petarj
Date: Tue Sep 12 14:43:33 2017
New Revision: 313077

URL: http://llvm.org/viewvc/llvm-project?rev=313077&view=rev
Log:
[mips] handle UImm16_AltRelaxed match type

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.

Patch by Aleksandar Beserminji.

Differential Revision: https://reviews.llvm.org/D37682

Modified:
    llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp

Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=313077&r1=313076&r2=313077&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Tue Sep 12 14:43:33 2017
@@ -5122,6 +5122,7 @@ bool MipsAsmParser::MatchAndEmitInstruct
                  "expected 11-bit signed immediate");
   case Match_UImm16:
   case Match_UImm16_Relaxed:
+  case Match_UImm16_AltRelaxed:
     return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo),
                  "expected 16-bit unsigned immediate");
   case Match_SImm16:




More information about the llvm-commits mailing list