This is an archive of the discontinued LLVM Phabricator instance.

[x86, InstCombine] fix masked loads pass-through operand to be a zero vector
ClosedPublic

Authored by spatel on Apr 12 2016, 9:17 AM.

Details

Summary

This bug was introduced with:
http://reviews.llvm.org/rL262269

AVX masked loads are specified to set vector lanes to zero when the high bit of the mask element for that lane is zero:
"If the mask is 0, the corresponding data element is set to zero in the load form of these instructions, and unmodified in the store form." --Intel manual

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 53416.Apr 12 2016, 9:17 AM
spatel retitled this revision from to [x86, InstCombine] fix masked loads pass-through operand to be a zero vector.
spatel updated this object.
spatel added reviewers: andreadb, RKSimon, delena.
spatel added a subscriber: llvm-commits.
andreadb accepted this revision.Apr 12 2016, 9:55 AM
andreadb edited edge metadata.

The patch LGTM.
I can confirm that it fixes the regression found.

Thanks for the quick fix Sanjay!

This revision is now accepted and ready to land.Apr 12 2016, 9:55 AM
This revision was automatically updated to reflect the committed changes.