This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel]: Fix lowering of G_SHUFFLE_VECTOR with scalar sources
ClosedPublic

Authored by aditya_nandakumar on Aug 13 2019, 2:29 PM.

Details

Summary

We need to handle scalar sources (1 element vector) correctly while lowering.

Diff Detail

Repository
rL LLVM

Event Timeline

arsenm accepted this revision.Aug 13 2019, 2:33 PM

LGTM, although I rather dislike that we allow these. Maybe the IRTranslator should be trying to turn these into the equivalent G_BUILD_VECTOR?

This revision is now accepted and ready to land.Aug 13 2019, 2:33 PM

LGTM, although I rather dislike that we allow these. Maybe the IRTranslator should be trying to turn these into the equivalent G_BUILD_VECTOR?

Thanks for the quick review.
I agree that this is messy. Turning it into BUILD_VECTOR seems to be like an optimization for now - but I don't really have a better solution. It's probably worth creating a patch and seeing what others think about it.

LGTM, although I rather dislike that we allow these. Maybe the IRTranslator should be trying to turn these into the equivalent G_BUILD_VECTOR?

+1