This is an archive of the discontinued LLVM Phabricator instance.

[VectorCombine] make load transform poison-safe
ClosedPublic

Authored by spatel on Dec 14 2020, 12:21 PM.

Details

Summary

As noted in D93229, the transform from scalar load to vector load potentially leaks poison from the extra vector elements that are being loaded.

We could use freeze here (and x86 codegen at least appears to be the same either way), but we already have a shuffle in this logic to optionally change the vector size, so let's allow that instruction to serve both purposes.

Diff Detail

Event Timeline

spatel created this revision.Dec 14 2020, 12:21 PM
spatel requested review of this revision.Dec 14 2020, 12:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 14 2020, 12:21 PM

LGTM, thanks.
(i didn't yet check if alive2 can point out any other problems given existing test coverage)

lebedev.ri accepted this revision.Dec 14 2020, 12:31 PM
This revision is now accepted and ready to land.Dec 14 2020, 12:31 PM
This revision was automatically updated to reflect the committed changes.