diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-05-29 11:58:52 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-05-29 11:58:52 +0000 |
commit | e1d9f00f097d9270c280d483123b4dcc2336b9d8 (patch) | |
tree | a67a32c10baf0b770ec1570f39a7adeeb62ab935 /llvm/lib/Target/SystemZ/SystemZLongBranch.cpp | |
parent | a4bf67e461e3e12aa14bd6b50cb6751b4c873720 (diff) | |
download | bcm5719-llvm-e1d9f00f097d9270c280d483123b4dcc2336b9d8.tar.gz bcm5719-llvm-e1d9f00f097d9270c280d483123b4dcc2336b9d8.zip |
[SystemZ] Immediate compare-and-branch support
This patch adds support for the CIJ and CGIJ instructions.
llvm-svn: 182846
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZLongBranch.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZLongBranch.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp index 2fc85f50f0f..24afb072ae8 100644 --- a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp +++ b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp @@ -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"); } |