diff options
author | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2018-03-19 13:05:22 +0000 |
---|---|---|
committer | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2018-03-19 13:05:22 +0000 |
commit | ea7c1d4e4e18cf5c5eb7dcae53458c2bfb363d21 (patch) | |
tree | d092be1a4680826472273233122a918168b125a5 /lib/Target/SystemZ | |
parent | 837541c2f18d272d99b6c318430d782557f79281 (diff) |
[SystemZ] Bugfix of CC liveness in emitMemMemWrapper (CLC).
If DoneMBB becomes empty it must have CC added to its live-in list, since it
will fall-through into EndMBB. This happens when the CLC loop does the
complete range.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ')
-rw-r--r-- | lib/Target/SystemZ/SystemZISelLowering.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/SystemZ/SystemZISelLowering.cpp b/lib/Target/SystemZ/SystemZISelLowering.cpp index bf2d1833515..5de324d1d46 100644 --- a/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -6626,6 +6626,10 @@ MachineBasicBlock *SystemZTargetLowering::emitMemMemWrapper( DestBase = MachineOperand::CreateReg(NextDestReg, false); SrcBase = MachineOperand::CreateReg(NextSrcReg, false); Length &= 255; + if (EndMBB && !Length) + // If the loop handled the whole CLC range, DoneMBB will be empty with + // CC live-through into EndMBB, so add it as live-in. + DoneMBB->addLiveIn(SystemZ::CC); MBB = DoneMBB; } // Handle any remaining bytes with straight-line code. |