[AArch64] Fix sext/zext folding in address arithmetic.
authorPete Cooper <peter_cooper@apple.com>
Thu, 7 May 2015 19:21:36 +0000 (19:21 +0000)
committerPete Cooper <peter_cooper@apple.com>
Thu, 7 May 2015 19:21:36 +0000 (19:21 +0000)
commitd887b7ef2f0b1683d63148fec02f276d4b9b2f3a
tree6d24b70c5489ef460ee0f995b074e8b1f67ddafb
parent12fe27fe055cbb20886abc38d91bd7b8bb5f61e1
[AArch64] Fix sext/zext folding in address arithmetic.

We were accidentally folding a sign/zero extend in to address arithmetic in a different BB when the extend wasn't available there.

Cross BB fast-isel isn't safe, so restrict this to only when the extend is in the same BB as the use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236764 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64FastISel.cpp
test/CodeGen/AArch64/fast-isel-address-extends.ll [new file with mode: 0644]