diff options
| author | Jim Grosbach <grosbach@apple.com> | 2011-07-19 19:45:44 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2011-07-19 19:45:44 +0000 |
| commit | 22ac078657efeeaf1cb497152e810e91e2890ee9 (patch) | |
| tree | b1594b4535809b60857e49e3b1a517490615d3d1 /llvm/lib/Target/ARM | |
| parent | cfa82a378df9a989330d06ca3daba44751962dd0 (diff) | |
| download | bcm5719-llvm-22ac078657efeeaf1cb497152e810e91e2890ee9.tar.gz bcm5719-llvm-22ac078657efeeaf1cb497152e810e91e2890ee9.zip | |
Tighten conditional for 'mov' cc_out.
Make sure we only clobber the cc_out operand if it is indeed a default
non-setting operand.
llvm-svn: 135506
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 9f6bd270bd0..1013ecf3ad8 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -2188,7 +2188,8 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc, // to check the type of the parsed immediate operand. if (Mnemonic == "mov" && Operands.size() > 4 && !static_cast<ARMOperand*>(Operands[4])->isARMSOImm() && - static_cast<ARMOperand*>(Operands[4])->isImm0_65535Expr()) { + static_cast<ARMOperand*>(Operands[4])->isImm0_65535Expr() && + static_cast<ARMOperand*>(Operands[1])->getReg() == 0) { ARMOperand *Op = static_cast<ARMOperand*>(Operands[1]); Operands.erase(Operands.begin() + 1); delete Op; |

