HomePhabricator

[SLP] Use getExtractWithExtendCost() to compute the scalar cost of…

Authored by haicheng on Apr 16 2018, 11:09 AM.

Description

[SLP] Use getExtractWithExtendCost() to compute the scalar cost of extractelement/ext pair

We use getExtractWithExtendCost to calculate the cost of extractelement and
s|zext together when computing the extract cost after vectorization, but we
calculate the cost of extractelement and s|zext separately when computing the
scalar cost which is larger than it should be.

Differential Revision: https://reviews.llvm.org/D45469

llvm-svn: 330143