slp: Support optimizing load distribution
authorTamar Christina <tamar.christina@arm.com>
Thu, 14 Jan 2021 20:50:57 +0000 (20:50 +0000)
committerTamar Christina <tamar.christina@arm.com>
Thu, 14 Jan 2021 20:54:31 +0000 (20:54 +0000)
commit500600c78408ab4c6450c7eeaea2e3657e305ed2
treed8f89de744aebd6b685529596e11a49bbaa65070
parentfe70119531395c8105b098bfa915c003c78be038
slp: Support optimizing load distribution

This introduces a post processing step for the pattern matcher to flatten
permutes introduced by the complex multiplications patterns.

This performs a blend early such that SLP is not cancelled by the LOAD_LANES
permute.  This is a temporary workaround to the fact that loads are not CSEd
during building and is required to produce efficient code.

gcc/ChangeLog:

* tree-vect-slp.c (optimize_load_redistribution_1): New.
(optimize_load_redistribution, vect_is_slp_load_node): New.
(vect_match_slp_patterns): Use it.
gcc/tree-vect-slp.c