This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner][X86][Mips] Enable combineShuffleOfScalars to run between vector op legalization and DAG legalization. Fix bad one use check in combineShuffleOfScalars
ClosedPublic

Authored by craig.topper on Nov 8 2018, 4:20 PM.

Details

Summary

It's possible for vector op legalization to generate a shuffle. If that happens we should give a chance for DAG combine to combine that with a build_vector input.

I also fixed a bug in combineShuffleOfScalars that was considering the number of uses on a undef input to a shuffle. We don't care how many times undef is used.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Nov 8 2018, 4:20 PM
RKSimon accepted this revision.Nov 9 2018, 6:33 AM

LGTM

This revision is now accepted and ready to land.Nov 9 2018, 6:33 AM
This revision was automatically updated to reflect the committed changes.