This is an archive of the discontinued LLVM Phabricator instance.

[TwoAddressInstructionPass] Bugfix in handling of sunk instructions.
ClosedPublic

Authored by jonpa on Dec 1 2017, 3:56 AM.

Details

Reviewers
qcolombet
Summary
An instruction returned by TII->convertToThreeAddress() may contain a %noreg
(undef) operand, which is not expected by tryInstructionTransform(). So if
this MI is sunk to a lower point in MBB, it must be skipped when later
encountered.

A new set SunkInstrs is used for this purpose.

Note: there is no test supplied here, as this was triggered on SystemZ while
working on a review of instruction flags. A test case for this bugfix will be
included in the upcoming SystemZ commit.

Diff Detail

Event Timeline

jonpa created this revision.Dec 1 2017, 3:56 AM
qcolombet accepted this revision.Dec 1 2017, 9:56 AM

LGTM.

Say in the comment that the test case will be part of a SystemZ commit.

This revision is now accepted and ready to land.Dec 1 2017, 9:56 AM
jonpa closed this revision.Dec 4 2017, 2:05 AM

r319646.