[LV] Prevent LV to run cost model twice for VF=2
authorDiego Caballero <diego.caballero@intel.com>
Fri, 15 Jun 2018 16:21:35 +0000 (16:21 +0000)
committerDiego Caballero <diego.caballero@intel.com>
Fri, 15 Jun 2018 16:21:35 +0000 (16:21 +0000)
commit68795245cfb3ca1d3c6ddb7e87ed8165de20dbef
treef38d08087348c1c1db404c66afee7183a797398c
parent6927cf0c2ae41e607883c453ce81f82bb922ff48
[LV] Prevent LV to run cost model twice for VF=2

This is a minor fix for LV cost model, where the cost for VF=2 was
computed twice when the vectorization of the loop was forced without
specifying a VF.

Reviewers: xusx595, hsaito, fhahn, mkuper

Reviewed By: hsaito, xusx595

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

llvm-svn: 334840
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/redundant-vf2-cost.ll [new file with mode: 0644]