This is an archive of the discontinued LLVM Phabricator instance.

[AVX-512] If gather mask is all ones, use UNDEF for the source
AbandonedPublic

Authored by craig.topper on Mar 11 2017, 9:32 AM.

Details

Summary

If mask is all ones we aren't going to keep any elements so we don't need a source. Currently we make sure we always have a source and even force the source to zero if it is received as undef.

This patch detects the all ones mask and forces the source to undef.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 11 2017, 9:32 AM
igorb accepted this revision.Mar 12 2017, 12:49 AM

LGTM

This revision is now accepted and ready to land.Mar 12 2017, 12:49 AM

I wonder if we shouldn't keep zeroes to break execution dependency. I don't think the existing undef handling in ExeDependencyFix can handle the early clobber.

I wonder if we shouldn't keep zeroes to break execution dependency. I don't think the existing undef handling in ExeDependencyFix can handle the early clobber.

May be it is also profitable to zero src in case mask is all ones ?

craig.topper abandoned this revision.Mar 13 2017, 11:30 AM

I've submitted r297651 to force the input to zero if the mask is all ones.