This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] insert a new shuffle before its uses (PR26015)
ClosedPublic

Authored by spatel on Jan 4 2016, 4:46 PM.

Details

Summary

Although this solves the test case in PR26015:
https://llvm.org/bugs/show_bug.cgi?id=26015

...I suspect this is not the best solution. I think we want to insert the new shuffle just ahead of the earliest ExtractElementInst that we're replacing, but I don't know how that should be implemented. Is there a way to compare/record the position of each extract that we encounter in the loop?

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 43935.Jan 4 2016, 4:46 PM
spatel retitled this revision from to [InstCombine] insert a new shuffle before its uses (PR26015).
spatel updated this object.
spatel added a subscriber: llvm-commits.
tstellarAMD accepted this revision.Jan 4 2016, 7:28 PM
tstellarAMD edited edge metadata.

I can't comment on the correctness of the implementation, but it fixes the regression reported in PR26015. Thanks for the quick fix.

This revision is now accepted and ready to land.Jan 4 2016, 7:28 PM
This revision was automatically updated to reflect the committed changes.