[AArch64] Match FI+offset in STNP addressing mode.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 10 Sep 2015 01:54:43 +0000 (01:54 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 10 Sep 2015 01:54:43 +0000 (01:54 +0000)
commitb01975128c71aeafc3e74c866342d4b60ee0725e
tree0930d3664a9f3afa1c452d0bc338a7100d34202e
parent399a0d8bc15bb43a650c906fa850d979e2370b96
[AArch64] Match FI+offset in STNP addressing mode.

First, we need to teach isFrameOffsetLegal about STNP.
It already knew about the STP/LDP variants, but those were probably
never exercised, because it's only the load/store optimizer that
generates STP/LDP, and the only user of the method is frame lowering,
which runs earlier.
The STP/LDP cases were wrong: they didn't take into account the fact
that they return two results, not one, so the immediate offset will be
the 4th operand, not the 3rd.

Follow-up to r247234.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247236 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/AArch64/nontemporal.ll