[ARM/AArch64] Fix cost model for interleaved accesses
authorSilviu Baranga <silviu.baranga@arm.com>
Mon, 27 Jul 2015 14:39:34 +0000 (14:39 +0000)
committerSilviu Baranga <silviu.baranga@arm.com>
Mon, 27 Jul 2015 14:39:34 +0000 (14:39 +0000)
commit541d0799474b0e800fa0df10b70cba11264b99f5
tree9109523e7678a65a6f6519f72f2ea94548678b04
parent7b1102220bf7096712a2474ec3e7cab528f3832c
[ARM/AArch64] Fix cost model for interleaved accesses

Summary:
Fix the cost of interleaved accesses for ARM/AArch64.
We were calling getTypeAllocSize and using it to check
the number of bits, when we should have called
getTypeAllocSizeInBits instead.

This would pottentially cause the vectorizer to
generate loads/stores and shuffles which cannot
be matched with an interleaved access instruction.

No performance changes are expected for now since
matching/generating interleaved accesses is still
disabled by default.

Reviewers: rengolin

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243270 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
lib/Target/ARM/ARMTargetTransformInfo.cpp
test/Transforms/LoopVectorize/AArch64/interleaved_cost.ll [new file with mode: 0644]
test/Transforms/LoopVectorize/ARM/interleaved_cost.ll [new file with mode: 0644]