[SLP] Look-ahead operand reordering heuristic.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Jun 2019 17:57:01 +0000 (17:57 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 21 Jun 2019 17:57:01 +0000 (17:57 +0000)
commit5698921be2d567f6abf925479ac9f5a376d6d74f
tree3d8514354279b7db7837e601f173f6039cd754ac
parent2441a4074c19257849b54be9b5e2a5c0ea87a48c
[SLP] Look-ahead operand reordering heuristic.

This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example).

Committed on behalf of @vporpo (Vasileios Porpodas)

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

llvm-svn: 364084
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll