OSDN Git Service

[TwoAddressInstructionPass] Bugfix in handling of sunk instructions.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 4 Dec 2017 10:03:14 +0000 (10:03 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 4 Dec 2017 10:03:14 +0000 (10:03 +0000)
commit62f11d908ed4e9b576d6769cfdbce3e215c40cd1
tree83a165afbf0fd1bfdc18f21d614deb825540b199
parent5022455191e0d386d601770f5ea936f6376d21f9
[TwoAddressInstructionPass]  Bugfix in handling of sunk instructions.

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.

Review: Quentin Colombet
https://reviews.llvm.org/D40711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319646 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TwoAddressInstructionPass.cpp