[SystemZ] Immediate compare-and-branch support

This patch adds support for the CIJ and CGIJ instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Sandiford
2013-05-29 11:58:52 +00:00
parent b8303eb654
commit 2d664abbfc
14 changed files with 1051 additions and 111 deletions

View File

@ -229,6 +229,11 @@ TerminatorInfo SystemZLongBranch::describeTerminator(MachineInstr *MI) {
// Relaxes to a CGR/BRCL sequence, which is 4 bytes longer.
Terminator.ExtraRelaxSize = 4;
break;
case SystemZ::CIJ:
case SystemZ::CGIJ:
// Relaxes to a C(G)HI/BRCL sequence, which is 4 bytes longer.
Terminator.ExtraRelaxSize = 4;
break;
default:
llvm_unreachable("Unrecognized branch instruction");
}
@ -361,6 +366,12 @@ void SystemZLongBranch::relaxBranch(TerminatorInfo &Terminator) {
case SystemZ::CGRJ:
splitCompareBranch(Branch, SystemZ::CGR);
break;
case SystemZ::CIJ:
splitCompareBranch(Branch, SystemZ::CHI);
break;
case SystemZ::CGIJ:
splitCompareBranch(Branch, SystemZ::CGHI);
break;
default:
llvm_unreachable("Unrecognized branch");
}