1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

[ModuloSchedule] Do not remap terminators

This is a trivial point fix. Terminator instructions aren't scheduled, so
we shouldn't expect to be able to remap them.

This doesn't affect Hexagon and PPC because their terminators are always
hardware loop backbranches that have no register operands.

llvm-svn: 373762
This commit is contained in:
James Molloy 2019-10-04 17:15:25 +00:00
parent a24a01e0c1
commit decbb4311a

View File

@ -1314,7 +1314,7 @@ void KernelRewriter::rewrite() {
// Now remap every instruction in the loop.
for (MachineInstr &MI : *BB) {
if (MI.isPHI())
if (MI.isPHI() || MI.isTerminator())
continue;
for (MachineOperand &MO : MI.uses()) {
if (!MO.isReg() || MO.getReg().isPhysical() || MO.isImplicit())