This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V,C)) -> VECTOR_SHUFFLE
ClosedPublic

Authored by RKSimon on Mar 6 2015, 6:21 PM.

Details

Summary

This patch attempts to convert a SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT) pair into a VECTOR_SHUFFLE.

This prevents many cases of (slow) spilling scalar data between the gpr + simd registers.

At present the optimization only accepts cases where there is no TRUNC of the scalar type (i.e. all types must match).

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 21413.Mar 6 2015, 6:21 PM
RKSimon retitled this revision from to [DAGCombiner] SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V,C)) -> VECTOR_SHUFFLE.
RKSimon updated this object.
RKSimon edited the test plan for this revision. (Show Details)
RKSimon added reviewers: mkuper, qcolombet, andreadb, spatel.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: Unknown Object (MLST).
This revision was automatically updated to reflect the committed changes.

Thanks Chandler