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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Valery Pykhtin 2016-03-14 05:25:44 +00:00
parent 699e699baa
commit a3a17e4d45

View File

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