AArch64TargetLowering::isLegalAddressingMode has a number of defects, including
accepting an addressing mode, which consists of only an immediate operand, or not checking
the offset range for an addressing mode in the form 1*ScaledReg + Offs.
This patch fixes the above issues.
Can you give more details why this is changed to HasBaseReg? It seems that isAlwaysFoldable already sets ScaledReg to 1 or -1, so this now tests for BaseReg + 1/-1*ScaledReg + IncOffset?