This is an archive of the discontinued LLVM Phabricator instance.

[TailDuplicator] Fix copy instruction emitting into the wrong block.
ClosedPublic

Authored by aemerson on Jul 1 2019, 5:08 PM.

Details

Summary

The code for duplicating instructions could sometimes try to emit copies intended to deal with unconstrainable register classes to the tail block of the original instruction, rather than before the newly cloned instruction in the predecessor block.

This was exposed by GlobalISel on arm64.

Diff Detail

Repository
rL LLVM

Event Timeline

aemerson created this revision.Jul 1 2019, 5:08 PM
arsenm accepted this revision.Jul 1 2019, 5:49 PM
arsenm added inline comments.
llvm/test/CodeGen/AArch64/taildup-inst-dup-loc.mir
3–48 ↗(On Diff #207444)

Should be able to drop most of this

This revision is now accepted and ready to land.Jul 1 2019, 5:49 PM
This revision was automatically updated to reflect the committed changes.