[FastISel][AArch64] Fix address simplification.
authorJuergen Ributzka <juergen@apple.com>
Wed, 27 Aug 2014 00:58:30 +0000 (00:58 +0000)
committerJuergen Ributzka <juergen@apple.com>
Wed, 27 Aug 2014 00:58:30 +0000 (00:58 +0000)
commitfc03e72b4f30e7ccb51f3cfb6faada689b333750
tree70e6554e4d6b3dcf3ac93f31e9cd46473ace6c83
parent836f4bd0903294ae7976356d7d507c8602e1044b
[FastISel][AArch64] Fix address simplification.

When a shift with extension or an add with shift and extension cannot be folded
into the memory operation, then the address calculation has to be materialized
separately. While doing so the code forgot to consider a possible sign-/zero-
extension. This fix folds now also the sign-/zero-extension into the add or
shift instruction which is used to materialize the address.

This fixes rdar://problem/18141718.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216511 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64FastISel.cpp
test/CodeGen/AArch64/fast-isel-addressing-modes.ll