Skip to content
Commit 0225b5bf authored by Andrea Di Biagio's avatar Andrea Di Biagio
Browse files

[DAG] Teach how to turn a build_vector into a shuffle if some of the operands are zero.

Before this patch, the DAGCombiner only tried to convert build_vector dag nodes
into shuffles if all operands were either extract_vector_elt or undef.

This patch improves that logic and teaches the DAGCombiner how to deal with
build_vector dag nodes where one or more operands are zero. A build_vector
dag node with some zero operands is turned into a shuffle only if the resulting
shuffle mask is legal for the target.

llvm-svn: 222536
parent 7a0f81a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment