Page MenuHomePhabricator

[x86] Follow-up to r302785 - don't widen vselect conditions when the vNi1 type being split into is a legal type (like it usually is w/ AVX-512).
AcceptedPublic

Authored by chandlerc on May 11 2017, 4:53 AM.

Details

Summary

The logic to widen the vselect stuff only makes sense if there are very
subtle issues where the vNi1 type used isn't generally legal but can
sneak through from a SETCC to a VSELECT because it will be matched away.
When the mask vectors are just normal vectors, we don't want to widen
them.

This would also paper over the bug fixed by r302785, because now we
never create the unfortunate pattern. I think the fix in r302785 is
still correct and important but we may no longer have a way to test it.

This does make the generated code for legalized types such as those in
r302785 much nicer, as shown in the test case.

Not really sure how folks want to proceed, so since this is just
a qualitative improvement, sending it for review to collect thoughts.

Event Timeline

chandlerc created this revision.May 11 2017, 4:53 AM
mkuper added a reviewer: zvi.May 11 2017, 10:33 AM

Ping... Seems like this should be a simple patch?

igorb added a subscriber: igorb.May 14 2017, 12:07 AM
zvi accepted this revision.May 14 2017, 4:21 AM

LGTM. Thanks!

This revision is now accepted and ready to land.May 14 2017, 4:21 AM