On 7/20/23 06:38, Richard Biener via Gcc-patches wrote:
When we materialize a layout we push edge permutes to constant/external
defs without checking we can actually do so. For externals defined
by vector stmts rather than scalar components we can't.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
OK?
Thanks,
Richard.
PR tree-optimization/110742
* tree-vect-slp.cc (vect_optimize_slp_pass::get_result_with_layout):
Do not materialize an edge permutation in an external node with
vector defs.
(vect_slp_analyze_node_operations_1): Guard purely internal
nodes better.
* g++.dg/torture/pr110742.C: New testcase.
OK
jeff