ARM assembly parser canonicallize on 'lsl' for shift-by-zero form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147152 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-12-22 17:37:00 +00:00
parent 18c8d12dea
commit de626ad872

View File

@ -2421,6 +2421,10 @@ int ARMAsmParser::tryParseShiftRegister(
Error(ImmLoc, "immediate shift value out of range");
return -1;
}
// shift by zero is a nop. Always send it through as lsl.
// ('as' compatibility)
if (Imm == 0)
ShiftTy = ARM_AM::lsl;
} else if (Parser.getTok().is(AsmToken::Identifier)) {
ShiftReg = tryParseRegister();
SMLoc L = Parser.getTok().getLoc();