[SLP] Recommit: Look-ahead operand reordering heuristic.
authorVasileios Porpodas <vasileios.porpodas@intel.com>
Tue, 2 Jul 2019 20:20:28 +0000 (20:20 +0000)
committerVasileios Porpodas <vasileios.porpodas@intel.com>
Tue, 2 Jul 2019 20:20:28 +0000 (20:20 +0000)
commitcf47ff5ffb1a750383e5bdd1f6c4d7d02c66e6f3
treef617263f059e984085299cf1e11b6ebd2de36bfb
parent097aedc9d9cf3a4c747f4374f56d3e39f3e4d9d1
[SLP] Recommit: Look-ahead operand reordering heuristic.

Summary: 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).

Reviewers: RKSimon, ABataev, dtemirbulatov, Ayal, hfinkel, rnk

Reviewed By: RKSimon, dtemirbulatov

Subscribers: hiraditya, phosek, rnk, rcorcs, llvm-commits

Tags: #llvm

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

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