diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 9fa389ab2c1..c2871502283 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3624,7 +3624,7 @@ parseSetEndImm(SmallVectorImpl &Operands) { Error(S, "'be' or 'le' operand expected"); return MatchOperand_ParseFail; } - int Val = StringSwitch(Tok.getString()) + int Val = StringSwitch(Tok.getString().lower()) .Case("be", 1) .Case("le", 0) .Default(-1); diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s index 5227bdd2397..4440ebd2609 100644 --- a/test/MC/ARM/basic-arm-instructions.s +++ b/test/MC/ARM/basic-arm-instructions.s @@ -1745,9 +1745,13 @@ Lforward: @ SETEND @------------------------------------------------------------------------------ setend be + setend BE setend le + setend LE @ CHECK: setend be @ encoding: [0x00,0x02,0x01,0xf1] +@ CHECK: setend be @ encoding: [0x00,0x02,0x01,0xf1] +@ CHECK: setend le @ encoding: [0x00,0x00,0x01,0xf1] @ CHECK: setend le @ encoding: [0x00,0x00,0x01,0xf1]