Reapply "[ARM] Combine base-updating/post-incrementing vector load/stores."
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Sat, 13 Dec 2014 23:22:12 +0000 (23:22 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Sat, 13 Dec 2014 23:22:12 +0000 (23:22 +0000)
commit780a093afb458b584df85c0c8a655d55069de113
tree5888f1b7a6ccf06a4ba178693e35b0e8165e9140
parent1e173b713997c74eff23c2058d7a44f107cdd63b
Reapply "[ARM] Combine base-updating/post-incrementing vector load/stores."

r223862 tried to also combine base-updating load/stores.
r224198 reverted it, as "it created a regression on the test-suite
on test MultiSource/Benchmarks/Ptrdist/anagram by scrambling the order
in which the words are shown."
Reapply, with a fix to ignore non-normal load/stores.
Truncstores are handled elsewhere (you can actually write a pattern for
those, whereas for postinc loads you can't, since they return two values),
but it should be possible to also combine extloads base updates, by checking
that the memory (rather than result) type is of the same size as the addend.

Original commit message:
We used to only combine intrinsics, and turn them into VLD1_UPD/VST1_UPD
when the base pointer is incremented after the load/store.

We can do the same thing for generic load/stores.

Note that we can only combine the first load/store+adds pair in
a sequence (as might be generated for a v16f32 load for instance),
because other combines turn the base pointer addition chain (each
computing the address of the next load, from the address of the last
load) into independent additions (common base pointer + this load's
offset).

Differential Revision: http://reviews.llvm.org/D6585

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224203 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/alloc-no-stack-realign.ll
test/CodeGen/ARM/memcpy-inline.ll
test/CodeGen/ARM/vector-load.ll [new file with mode: 0644]
test/CodeGen/ARM/vector-store.ll [new file with mode: 0644]
test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll