This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Implement narrowScalar for select
ClosedPublic

Authored by arsenm on Jan 31 2019, 9:22 AM.

Details

Summary

Don't handle vector conditions.

I think this can be merged in the future with
fewerElementsVectorSelect, although this becomes slightly tricky with
a vector condition.

Diff Detail

Event Timeline

arsenm created this revision.Jan 31 2019, 9:22 AM
aemerson accepted this revision.Feb 4 2019, 3:21 PM
aemerson added inline comments.
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2256

I think this should either be an assert or return UnableToLegalize and report a fallback.

This revision is now accepted and ready to land.Feb 4 2019, 3:21 PM
arsenm marked an inline comment as done.Feb 4 2019, 3:28 PM
arsenm added inline comments.
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2256

This is basically an assert, just a different style that doesn't require a temporary variable that will need a void cast to silence the unused variable warning on in a release build.

I don't think this should be UnableToLegalize, since it should work if the first call worked. If it were to somehow fail when the first did, it would have created dead instructions (which I guess would be OK?)

aemerson added inline comments.Feb 4 2019, 3:40 PM
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2256

True it should always work if the first one did.

arsenm closed this revision.Feb 4 2019, 4:13 PM

r353122