[LoopVectorizer, TTI] New method supportsEfficientVectorElementLoadStore()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 12 Apr 2017 12:41:37 +0000 (12:41 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 12 Apr 2017 12:41:37 +0000 (12:41 +0000)
commitda74ed42dadbbf62644fb8fe0ff1e7885c7b2a04
tree5ead03687c900acdb6bf62c7c34fa34f62b03480
parent12194e9bec6f5c4dc887659983764e6cfb708205
[LoopVectorizer, TTI]  New method supportsEfficientVectorElementLoadStore()

Since SystemZ supports vector element load/store instructions, there is no
need for extracts/inserts if a vector load/store gets scalarized.

This patch lets Target specify that it supports such instructions by means of
a new TTI hook that defaults to false.

The use for this is in the LoopVectorizer getScalarizationOverhead() method,
which will with this patch produce a smaller sum for a vector load/store on
SystemZ.

New test: test/Transforms/LoopVectorize/SystemZ/load-store-scalarization-cost.ll

Review: Adam Nemet
https://reviews.llvm.org/D30680

llvm-svn: 300056
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/SystemZ/load-store-scalarization-cost.ll [new file with mode: 0644]