Page MenuHomePhabricator

[InstSimplify] fold splat of inserted constant to vector constant

Authored by spatel on Dec 13 2019, 1:09 PM.



shuf (inselt ?, C, IndexC), undef, <IndexC, IndexC...> --> <C, C...>

This is another missing shuffle fold pattern uncovered by the shuffle correctness fix from D70246.
The problem was visible in the post-commit thread example posted by @foad, but we managed to overcome the limitation for that particular case with D71220.
This is something like the inverse of the previous fix - there we didn't demand the inserted scalar, and here we are only demanding an inserted scalar.

Diff Detail

Event Timeline

spatel created this revision.Dec 13 2019, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2019, 1:09 PM
This revision is now accepted and ready to land.Dec 13 2019, 3:05 PM
This revision was automatically updated to reflect the committed changes.