When analyzing vectors of element type that require legalization,
authorRaul E. Silvera <rsilvera@google.com>
Mon, 10 Mar 2014 22:59:13 +0000 (22:59 +0000)
committerRaul E. Silvera <rsilvera@google.com>
Mon, 10 Mar 2014 22:59:13 +0000 (22:59 +0000)
commit6df2b690989f499965640305b2045142192eca74
treec20a09914280991ec6209559cd9f04f946b30d27
parent87393cfd6b4e85e1b9baf804784e69dde30e019a
When analyzing vectors of element type that require legalization,
the legalization cost must be included to get an accurate
estimation of the total cost of the scalarized vector.
The inaccurate cost triggered unprofitable SLP vectorization on
32-bit X86.

Summary:
Include legalization overhead when computing scalarization cost

Reviewers: hfinkel, nadav

CC: chandlerc, rnk, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2992

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203509 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BasicTargetTransformInfo.cpp
test/Analysis/CostModel/ARM/cast.ll
test/Analysis/CostModel/X86/scalarize.ll [new file with mode: 0644]