From 549a31cd3475ba74244f70cc29b8edb6c597e3ce Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 30 Oct 2010 04:35:59 +0000 Subject: [PATCH] simplify this code. llvm-svn: 117771 --- llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 275fcb98a736..642cd9c93070 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -744,15 +744,11 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc, .Case("al", ARMCC::AL) .Default(~0U); - if (CC != ~0U) { - if (CC == ARMCC::LS && - (Head.compare("vmls") == 0 || Head.compare("vnmls") == 0)) { - CC = ARMCC::AL; - } else { - Head = Head.slice(0, Head.size() - 2); - } - } else { + if (CC == ~0U || + (CC == ARMCC::LS && (Head == "vmls" || Head == "vnmls"))) { CC = ARMCC::AL; + } else { + Head = Head.slice(0, Head.size() - 2); } Operands.push_back(ARMOperand::CreateToken(Head, NameLoc));