[AMDGPU] AsmParser: refactor post push_back vector access. NFC.

llvm-svn: 263409
This commit is contained in:
Valery Pykhtin 2016-03-14 05:25:44 +00:00
parent b9456a5eb3
commit 9e33c7f5d3
1 changed files with 5 additions and 6 deletions

View File

@ -1106,14 +1106,13 @@ AMDGPUAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) {
Parser.Lex(); Parser.Lex();
Modifiers |= 0x2; Modifiers |= 0x2;
} }
Operands.push_back(AMDGPUOperand::CreateReg( auto R = AMDGPUOperand::CreateReg(RegNo, S, E,
RegNo, S, E, getContext().getRegisterInfo(), &getSTI(), getContext().getRegisterInfo(),
isForcedVOP3())); &getSTI(), isForcedVOP3());
if (Modifiers) { if (Modifiers) {
AMDGPUOperand &RegOp = ((AMDGPUOperand&)*Operands[Operands.size() - 1]); R->setModifiers(Modifiers);
RegOp.setModifiers(Modifiers);
} }
Operands.push_back(std::move(R));
} else { } else {
ResTy = parseVOP3OptionalOps(Operands); ResTy = parseVOP3OptionalOps(Operands);
if (ResTy == MatchOperand_NoMatch) { if (ResTy == MatchOperand_NoMatch) {