This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAGBuilder] Simplify creation of shufflevector DAG nodes where inputs are larger than the mask
ClosedPublic

Authored by craig.topper on Feb 13 2017, 10:08 PM.

Details

Summary

The current code loops over all elements to calculate a used range. Then a second short loop looks at the ranges and determines if they can be used in a extract and creates a properly aligned start index for the extract.

This range finding is unnecessary, we can just calculate a properly aligned start index for an extract for each input during the first loop. If we don't find the same start index for each indice we can't use an extract.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Feb 13 2017, 10:08 PM
zvi accepted this revision.Feb 14 2017, 12:37 AM

LGTM

This revision is now accepted and ready to land.Feb 14 2017, 12:37 AM
This revision was automatically updated to reflect the committed changes.